Skip to contentSkip to conversation

Ocfs2: Should ocfs2 support fiemap for S_IFDIR inode?

PATCH New Tristan Ye 2 participants 3 messages Dec 17, 2009 – Dec 18, 2009 OCFS2

lore
Share & tools
lore

Tristan Ye

author
#0 lore raw

PATCH 1/1 Ocfs2: Should ocfs2 support fiemap for S_IFDIR inode?

Let userspace have a chance to get the extent info of a directory just like extN did.

---
 fs/ocfs2/namei.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/namei.c +1 -0
index f010b22..0b9f35e 100644
@@ -2326,4 +2326,5 @@ const struct inode_operations ocfs2_dir_iops = {
 	.getxattr	= generic_getxattr,
 	.listxattr	= ocfs2_listxattr,
 	.removexattr	= generic_removexattr,
+	.fiemap         = ocfs2_fiemap,
 };
Signature · 1 line
1.6.5.2
#1 lore raw

PATCH 1/1 Ocfs2: Should ocfs2 support fiemap for S_IFDIR inode?

I see no reason why we should not add it to symlink and fast_symlink too. But that would need testing. Make that a separate patch. This one looks good as is.

Quoted 18 lines · Tristan Ye

Let userspace have a chance to get the extent info of a directory just like extN did.

---
 fs/ocfs2/namei.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/namei.c +1 -0
index f010b22..0b9f35e 100644
@@ -2326,4 +2326,5 @@ const struct inode_operations ocfs2_dir_iops = {
 	.getxattr	= generic_getxattr,
 	.listxattr	= ocfs2_listxattr,
 	.removexattr	= generic_removexattr,
+	.fiemap         = ocfs2_fiemap,
 };
author
#2 lore raw

PATCH 1/1 Ocfs2: Should ocfs2 support fiemap for S_IFDIR inode?

Quoted 5 lines · Sunil Mushran

I see no reason why we should not add it to symlink and fast_symlink too. But that would need testing. Make that a separate patch. This one looks good as is.

Yes, I've tested on directory, it works for me.

Will take a look at symlink and fast_symlink.

Tristan.

Quoted 21 lines
Quoted 18 lines · Tristan Ye

Let userspace have a chance to get the extent info of a directory just like extN did.

---
 fs/ocfs2/namei.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/namei.c +1 -0
index f010b22..0b9f35e 100644
@@ -2326,4 +2326,5 @@ const struct inode_operations ocfs2_dir_iops = {
     .getxattr    = generic_getxattr,
     .listxattr    = ocfs2_listxattr,
     .removexattr    = generic_removexattr,
+    .fiemap         = ocfs2_fiemap,
 };