lkml.org 
[lkml]   [2013]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] f2fs: align f2fs maximum name length to linux based filesystem
Date
From: Namjae Jeon <namjae.jeon@samsung.com>

Since, maximum filename length supported in linux is 255 characters.
So, there is no need to reserve space for 256 characters in f2fs inode.
This aligns the filename length to NFS requests also which also
has a default limit of '255'.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
---
include/linux/f2fs_fs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index f9a12f6..f7bd27d 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -139,7 +139,7 @@ struct f2fs_extent {
__le32 len; /* lengh of the extent */
} __packed;

-#define F2FS_MAX_NAME_LEN 256
+#define F2FS_MAX_NAME_LEN 255
#define ADDRS_PER_INODE 923 /* Address Pointers in an Inode */
#define ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */
#define NIDS_PER_BLOCK 1018 /* Node IDs in an Indirect Block */
@@ -166,6 +166,7 @@ struct f2fs_inode {
__le32 i_pino; /* parent inode number */
__le32 i_namelen; /* file name length */
__u8 i_name[F2FS_MAX_NAME_LEN]; /* file name for SPOR */
+ __u8 i_reserved_2; /* reserved for future use*/

struct f2fs_extent i_ext; /* caching a largest extent */

--
1.7.9.5


\
 
 \ /
  Last update: 2013-03-02 06:43    [W:0.360 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site