* [RESEND][PATCH 1/3] lustre: don't set f_version in ll_readdir
2017-12-07 11:32 [RESEND][PATCH 0/3] fs: remove unnecessary i_version handling from various filesystems Jeff Layton
@ 2017-12-07 11:32 ` Jeff Layton
2017-12-07 11:32 ` [RESEND][PATCH 2/3] ntfs: remove i_version handling Jeff Layton
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2017-12-07 11:32 UTC (permalink / raw)
To: akpm
Cc: lustre-devel, anton, andreas.dilger, oleg.drokin, jsimmons,
mikulas, linux-kernel, linux-ntfs-dev, linux-fsdevel
From: Jeff Layton <jlayton@redhat.com>
f_version is only ever used by filesystem-specific code. Generic
VFS code never uses it.
Nothing in lustre ever looks at it, so just remove this.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
---
drivers/staging/lustre/lustre/llite/dir.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 5b2e47c246f3..6f59045be0f9 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -369,8 +369,6 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)
}
ctx->pos = pos;
ll_finish_md_op_data(op_data);
- filp->f_version = inode->i_version;
-
out:
if (!rc)
ll_stats_ops_tally(sbi, LPROC_LL_READDIR, 1);
@@ -1678,7 +1676,6 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin)
else
fd->lfd_pos = offset;
file->f_pos = offset;
- file->f_version = 0;
}
ret = offset;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [RESEND][PATCH 2/3] ntfs: remove i_version handling
2017-12-07 11:32 [RESEND][PATCH 0/3] fs: remove unnecessary i_version handling from various filesystems Jeff Layton
2017-12-07 11:32 ` [RESEND][PATCH 1/3] lustre: don't set f_version in ll_readdir Jeff Layton
@ 2017-12-07 11:32 ` Jeff Layton
2017-12-07 11:32 ` [RESEND][PATCH 3/3] hpfs: don't bother with the i_version counter or f_version Jeff Layton
2017-12-07 11:40 ` [RESEND][PATCH 0/3] fs: remove unnecessary i_version handling from various filesystems Anton Altaparmakov
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2017-12-07 11:32 UTC (permalink / raw)
To: akpm
Cc: lustre-devel, anton, andreas.dilger, oleg.drokin, jsimmons,
mikulas, linux-kernel, linux-ntfs-dev, linux-fsdevel
From: Jeff Layton <jlayton@redhat.com>
NTFS keeps track of the i_version counter here, seemingly for no reason.
It does not set the SB_I_VERSION flag so it'll never be incremented on
write, and it doesn't increment it internally for metadata operations.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/ntfs/inode.c | 9 ---------
fs/ntfs/mft.c | 6 ------
2 files changed, 15 deletions(-)
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 7c410f879412..1c1ee489284b 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -560,13 +560,6 @@ static int ntfs_read_locked_inode(struct inode *vi)
ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino);
/* Setup the generic vfs inode parts now. */
-
- /*
- * This is for checking whether an inode has changed w.r.t. a file so
- * that the file can be updated if necessary (compare with f_version).
- */
- vi->i_version = 1;
-
vi->i_uid = vol->uid;
vi->i_gid = vol->gid;
vi->i_mode = 0;
@@ -1240,7 +1233,6 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
base_ni = NTFS_I(base_vi);
/* Just mirror the values from the base inode. */
- vi->i_version = base_vi->i_version;
vi->i_uid = base_vi->i_uid;
vi->i_gid = base_vi->i_gid;
set_nlink(vi, base_vi->i_nlink);
@@ -1507,7 +1499,6 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
ni = NTFS_I(vi);
base_ni = NTFS_I(base_vi);
/* Just mirror the values from the base inode. */
- vi->i_version = base_vi->i_version;
vi->i_uid = base_vi->i_uid;
vi->i_gid = base_vi->i_gid;
set_nlink(vi, base_vi->i_nlink);
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
index ee8392aee9f6..2831f495a674 100644
--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -2641,12 +2641,6 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode,
goto undo_mftbmp_alloc;
}
vi->i_ino = bit;
- /*
- * This is for checking whether an inode has changed w.r.t. a
- * file so that the file can be updated if necessary (compare
- * with f_version).
- */
- vi->i_version = 1;
/* The owner and group come from the ntfs volume. */
vi->i_uid = vol->uid;
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [RESEND][PATCH 3/3] hpfs: don't bother with the i_version counter or f_version
2017-12-07 11:32 [RESEND][PATCH 0/3] fs: remove unnecessary i_version handling from various filesystems Jeff Layton
2017-12-07 11:32 ` [RESEND][PATCH 1/3] lustre: don't set f_version in ll_readdir Jeff Layton
2017-12-07 11:32 ` [RESEND][PATCH 2/3] ntfs: remove i_version handling Jeff Layton
@ 2017-12-07 11:32 ` Jeff Layton
2017-12-07 11:40 ` [RESEND][PATCH 0/3] fs: remove unnecessary i_version handling from various filesystems Anton Altaparmakov
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2017-12-07 11:32 UTC (permalink / raw)
To: akpm
Cc: lustre-devel, anton, andreas.dilger, oleg.drokin, jsimmons,
mikulas, linux-kernel, linux-ntfs-dev, linux-fsdevel
From: Jeff Layton <jlayton@redhat.com>
HPFS does not set SB_I_VERSION and does not use the i_version counter
internally.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/hpfs/dir.c | 1 -
fs/hpfs/dnode.c | 2 --
fs/hpfs/super.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c
index 8d6b7e35faf9..c83ece7facc5 100644
--- a/fs/hpfs/dir.c
+++ b/fs/hpfs/dir.c
@@ -150,7 +150,6 @@ static int hpfs_readdir(struct file *file, struct dir_context *ctx)
if (unlikely(ret < 0))
goto out;
ctx->pos = ((loff_t) hpfs_de_as_down_as_possible(inode->i_sb, hpfs_inode->i_dno) << 4) + 1;
- file->f_version = inode->i_version;
}
next_pos = ctx->pos;
if (!(de = map_pos_dirent(inode, &next_pos, &qbh))) {
diff --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
index 3b834563b1f1..a4ad18afbdec 100644
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -419,7 +419,6 @@ int hpfs_add_dirent(struct inode *i,
c = 1;
goto ret;
}
- i->i_version++;
c = hpfs_add_to_dnode(i, dno, name, namelen, new_de, 0);
ret:
return c;
@@ -726,7 +725,6 @@ int hpfs_remove_dirent(struct inode *i, dnode_secno dno, struct hpfs_dirent *de,
return 2;
}
}
- i->i_version++;
for_all_poss(i, hpfs_pos_del, (t = get_pos(dnode, de)) + 1, 1);
hpfs_delete_de(i->i_sb, dnode, de);
hpfs_mark_4buffers_dirty(qbh);
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index c45a3b9b9ac7..f2c3ebcd309c 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -235,7 +235,6 @@ static struct inode *hpfs_alloc_inode(struct super_block *sb)
ei = kmem_cache_alloc(hpfs_inode_cachep, GFP_NOFS);
if (!ei)
return NULL;
- ei->vfs_inode.i_version = 1;
return &ei->vfs_inode;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [RESEND][PATCH 0/3] fs: remove unnecessary i_version handling from various filesystems
2017-12-07 11:32 [RESEND][PATCH 0/3] fs: remove unnecessary i_version handling from various filesystems Jeff Layton
` (2 preceding siblings ...)
2017-12-07 11:32 ` [RESEND][PATCH 3/3] hpfs: don't bother with the i_version counter or f_version Jeff Layton
@ 2017-12-07 11:40 ` Anton Altaparmakov
3 siblings, 0 replies; 5+ messages in thread
From: Anton Altaparmakov @ 2017-12-07 11:40 UTC (permalink / raw)
To: Jeff Layton
Cc: jsimmons@infradead.org, linux-ntfs-dev@lists.sourceforge.net,
linux-kernel@vger.kernel.org, oleg.drokin@intel.com,
mikulas@artax.karlin.mff.cuni.cz, linux-fsdevel@vger.kernel.org,
andreas.dilger@intel.com, akpm@linux-foundation.org,
lustre-devel@lists.lustre.org
[-- Attachment #1.1: Type: text/plain, Size: 1436 bytes --]
Hi,
Yes please to merging the ntfs one at least.
And guilty as charged on the cargo-cult copying... (-;
Best regards,
Anton
On 7 Dec 2017, at 11:32, Jeff Layton <jlayton@kernel.org<mailto:jlayton@kernel.org>> wrote:
From: Jeff Layton <jlayton@redhat.com<mailto:jlayton@redhat.com>>
Hi Andrew,
I sent these patches to the various fs maintainers prior to the last
merge window, but they didn't get picked up. This is mainly removing
i_version/f_version handling from filesystems that don't implement it
properly, and that don't use it anyway.
This is almost certainly the result of cargo-cult copying from other
filesystems.
Would you be willing to merge these for the v4.16 window?
Thanks,
Jeff
Jeff Layton (3):
lustre: don't set f_version in ll_readdir
ntfs: remove i_version handling
hpfs: don't bother with the i_version counter or f_version
drivers/staging/lustre/lustre/llite/dir.c | 3 ---
fs/hpfs/dir.c | 1 -
fs/hpfs/dnode.c | 2 --
fs/hpfs/super.c | 1 -
fs/ntfs/inode.c | 9 ---------
fs/ntfs/mft.c | 6 ------
6 files changed, 22 deletions(-)
--
2.14.3
--
Anton Altaparmakov <anton at tuxera.com<http://tuxera.com>> (replace at with @)
Lead in File System Development, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer
[-- Attachment #1.2: Type: text/html, Size: 4449 bytes --]
[-- Attachment #2: Type: text/plain, Size: 202 bytes --]
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
[-- Attachment #3: Type: text/plain, Size: 173 bytes --]
_______________________________________________
Linux-NTFS-Dev mailing list
Linux-NTFS-Dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-ntfs-dev
^ permalink raw reply [flat|nested] 5+ messages in thread