Skip to contentSkip to conversation

f2fs backport and typo fix

PATCH Applied Alejandro Martinez Ruiz 2 participants 3 messages Jan 28, 2013 – Jan 29, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

I recently ported f2fs to kernel 3.2, but I am not sure whether the changes are all OK. If so, that could be useful to a number of projects, and I'd very much appreciate any help in reviewing and looking for possible errors or omissions, specially those related to VFS.

You can check the 3.2 kernel patches in http://github.com/nowcomputing/f2fs-backports.

Additionally, I just noticed a typo in f2fs options. Here's a patch for use with git am --scissors.

Thanks,
Alex

-- >8 --
From: Alejandro Martinez Ruiz <[email protected]>
Date: Fri, 25 Jan 2013 19:08:59 +0100
Subject: [PATCH] f2fs: fix disable_ext_identify option spelling

There is a typo in the ->show_options function for disable_ext_identify. Fix it to match the spelling from the documentation.

---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/super.c +1 -1
index 117ca2a..25656b6 100644
@@ -198,7 +198,7 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
 		seq_puts(seq, ",noacl");
 #endif
 	if (test_opt(sbi, DISABLE_EXT_IDENTIFY))
-		seq_puts(seq, ",disable_ext_indentify");
+		seq_puts(seq, ",disable_ext_identify");
 
 	seq_printf(seq, ",active_logs=%u", sbi->active_logs);
 
Signature · 1 line
1.8.1.rc1.17.g75ed918
Applied
#1 lore raw

Hi,

2013-01-28 (월), 13:11 +0100, Alejandro Martinez Ruiz:

Quoted 6 lines

Hi,

I recently ported f2fs to kernel 3.2, but I am not sure whether the changes are all OK. If so, that could be useful to a number of projects, and I'd very much appreciate any help in reviewing and looking for possible errors or omissions, specially those related to VFS.

Great job. Thank you for the work.
BTW, as I see your patches in the repo, it would be better to modify the following patch.
Except this, everything looks good to me at a glance.

0002-vfs-export-symbol-d_find_any_alias.patch
- Let's avoid modifying the kernel core.

@@ -104,19 +102,14 @@ static int need_to_sync_dir(struct f2fs_sb_info *sbi, struct inode *inode)

        struct dentry *dentry;
        nid_t pino;
-       inode = igrab(inode);
-       dentry = d_find_any_alias(inode);
-       if (!dentry) {

- iput(inode);
+ dentry = list_entry(inode->i_dentry.next, struct dentry,
d_alias);
+ if (!dentry)

                return 0;
-       }
        pino = dentry->d_parent->d_inode->i_ino;
-       dput(dentry);
-       iput(inode);
        return !is_checkpointed_node(sbi, pino);

}

Quoted 5 lines

You can check the 3.2 kernel patches in http://github.com/nowcomputing/f2fs-backports.

Additionally, I just noticed a typo in f2fs options. Here's a patch for use with git am --scissors.

Applied, thank you~ :)

Signature · 2 lines
Jaegeuk Kim
Samsung
#2 lore raw

Hi,

Quoted 18 lines · Jaegeuk Kim

Great job. Thank you for the work.
BTW, as I see your patches in the repo, it would be better to modify the following patch.
Except this, everything looks good to me at a glance.

0002-vfs-export-symbol-d_find_any_alias.patch
- Let's avoid modifying the kernel core.

(quoted diff) +1 -4
@@ -104,19 +102,14 @@ static int need_to_sync_dir(struct f2fs_sb_info
 *sbi, struct inode *inode)
        struct dentry *dentry;
        nid_t pino;
 
-       inode = igrab(inode);
-       dentry = d_find_any_alias(inode);
-       if (!dentry) {
-               iput(inode);
+       dentry = list_entry(inode->i_dentry.next, struct dentry,

Review static int need_to_sync_dir(struct f2fs_sb_info · line 113

Quoted 10 lines
(quoted diff) +1 -3
 d_alias);
+       if (!dentry)
                return 0;
-       }
        pino = dentry->d_parent->d_inode->i_ino;
-       dput(dentry);
-       iput(inode);
        return !is_checkpointed_node(sbi, pino);
 }
 

I initially thought exporting a symbol was not a big deal, but it is certainly not the right thing to do. I very much prefer your patch. Fixed now, thanks for your input!

Alex