[f2fs-dev] [PATCH v2 88/89] fs: switch timespec64 fields in inode to discrete integers

2023-10-04 Thread Jeff Layton
This shaves 8 bytes off struct inode with a garden-variety Fedora Kconfig. Signed-off-by: Jeff Layton --- include/linux/fs.h | 53 ++ 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index

[f2fs-dev] [PATCH v2 89/89] fs: move i_generation into new hole created after timestamp conversion

2023-10-04 Thread Jeff Layton
the i_fsnotify_mask in my setup. Suggested-by: Amir Goldstein Signed-off-by: Jeff Layton --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 485b5e21c8e5..686c9f33e725 100644 --- a/include/linux/fs.h +++ b/include/linux

[f2fs-dev] [PATCH v2 87/89] fs: rename inode i_atime and i_mtime fields

2023-10-04 Thread Jeff Layton
Rename these two fields to discourage direct access (and to help ensure that we mop up any leftover direct accesses). Signed-off-by: Jeff Layton --- include/linux/fs.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/fs.h b/include/linux

[f2fs-dev] [PATCH v2 36/89] f2fs: convert to new timestamp accessors

2023-10-04 Thread Jeff Layton
Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/f2fs/dir.c | 6 +++--- fs/f2fs/f2fs.h | 10 ++ fs/f2fs/file.c | 14 +++--- fs/f2fs/inline.c | 2 +- fs/f2fs/inode.c| 24 fs/f2fs/namei.c

[f2fs-dev] [PATCH v2 01/89] fs: new accessor methods for atime and mtime

2023-10-04 Thread Jeff Layton
for the atime and mtime that mirror the accessors for the ctime. Signed-off-by: Jeff Layton --- fs/libfs.c | 41 -- include/linux/fs.h | 85 +++--- 2 files changed, 102 insertions(+), 24 deletions(-) diff --git a/fs/libfs.c b/fs

[f2fs-dev] [PATCH v2 00/89] fs: new accessor methods for inode atime and mtime

2023-10-04 Thread Jeff Layton
lucky). Jeff Layton (89): fs: new accessor methods for atime and mtime fs: convert core infrastructure to new timestamp accessors spufs: convert to new timestamp accessors hypfs: convert to new timestamp accessors android: convert to new timestamp accessors char: convert to new

[f2fs-dev] [PATCH v2 02/89] fs: convert core infrastructure to new timestamp accessors

2023-10-04 Thread Jeff Layton
Convert the core vfs code to use the new timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/attr.c| 4 ++-- fs/bad_inode.c | 2 +- fs/binfmt_misc.c | 2 +- fs/inode.c | 35 +-- fs/nsfs.c| 2 +- fs/pipe.c| 2 +- fs

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-29 Thread Jeff Layton
'm planning to do a v2 patchbomb early next week, with the changes that Chuck suggested (specific helpers for fetching the _sec and _nsec fields). For now, I'll drop the change from timespec64 to discrete fields. We can do that in a separate follow-on set. -- Jeff Layton __

Re: [f2fs-dev] [PATCH 87/87] fs: move i_blocks up a few places in struct inode

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 10:41 -0700, Linus Torvalds wrote: > On Thu, 28 Sept 2023 at 04:06, Jeff Layton wrote: > > > > Move i_blocks up above the i_lock, which moves the new 4 byte hole to > > just after the timestamps, without changing the size of the structure. >

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 10:19 -0700, Darrick J. Wong wrote: > On Thu, Sep 28, 2023 at 01:06:03PM -0400, Jeff Layton wrote: > > On Thu, 2023-09-28 at 11:48 -0400, Arnd Bergmann wrote: > > > On Thu, Sep 28, 2023, at 07:05, Jeff Layton wrote: > > > > This shaves 8 byt

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 07:05 -0400, Jeff Layton wrote: > This shaves 8 bytes off struct inode, according to pahole. > > Signed-off-by: Jeff Layton > --- > include/linux/fs.h | 32 +++- > 1 file changed, 23 insertions(+), 9 deletions(-) > > di

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 11:48 -0400, Arnd Bergmann wrote: > On Thu, Sep 28, 2023, at 07:05, Jeff Layton wrote: > > This shaves 8 bytes off struct inode, according to pahole. > > > > Signed-off-by: Jeff Layton > > FWIW, this is similar to the approach that Dee

Re: [f2fs-dev] [PATCH 87/87] fs: move i_blocks up a few places in struct inode

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 14:35 +0300, Amir Goldstein wrote: > On Thu, Sep 28, 2023 at 2:06 PM Jeff Layton wrote: > > > > The recent change to use discrete integers instead of struct timespec64 > > in struct inode shaved 8 bytes off of it, but it also moves the i_lock > >

[f2fs-dev] [PATCH 87/87] fs: move i_blocks up a few places in struct inode

2023-09-28 Thread Jeff Layton
the timestamps, without changing the size of the structure. Signed-off-by: Jeff Layton --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index de902ff2938b..3e0fe0f52e7c 100644 --- a/include/linux/fs.h +++ b/include/linux

[f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Jeff Layton
This shaves 8 bytes off struct inode, according to pahole. Signed-off-by: Jeff Layton --- include/linux/fs.h | 32 +++- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 831657011036..de902ff2938b 100644

[f2fs-dev] [PATCH 85/87] fs: rename i_atime and i_mtime fields to __i_atime and __i_mtime

2023-09-28 Thread Jeff Layton
Make it clear that these fields are private now, and that the accessors should be used instead. Signed-off-by: Jeff Layton --- include/linux/fs.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 12d247b82aa0

[f2fs-dev] [PATCH 35/87] fs/f2fs: convert to new inode {a, m}time accessors

2023-09-28 Thread Jeff Layton
Signed-off-by: Jeff Layton --- fs/f2fs/dir.c | 6 +++--- fs/f2fs/f2fs.h | 10 ++ fs/f2fs/file.c | 14 +++--- fs/f2fs/inline.c | 2 +- fs/f2fs/inode.c| 20 ++-- fs/f2fs/namei.c| 4 ++-- fs/f2fs/recovery.c | 8 fs/f2fs/super.c

[f2fs-dev] [PATCH 01/87] fs: new accessor methods for atime and mtime

2023-09-28 Thread Jeff Layton
for the atime and mtime that mirror the accessors for the ctime. Signed-off-by: Jeff Layton --- fs/libfs.c | 13 + include/linux/fs.h | 42 ++ 2 files changed, 55 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index 37f2d34ee090

[f2fs-dev] [PATCH 00/87] fs: new accessor methods for atime and mtime

2023-09-28 Thread Jeff Layton
% of this conversion was done with coccinelle, with the rest done by hand with vim. Jeff Layton (87): fs: new accessor methods for atime and mtime fs: convert core infrastructure to new {a,m}time accessors arch/powerpc/platforms/cell/spufs: convert to new inode {a,m}time accessors arch/s390/hypfs

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
time to ponder the options for this series anyway, and another cycle in next wouldn't hurt. The branch itself looks fine, but you might want to reverse the order of the patches in case someone lands there in the middle of a bisect. IOW, I think you want to revert the "convert to multigrain"

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 14:48 +0200, Jan Kara wrote: > On Wed 20-09-23 06:35:18, Jeff Layton wrote: > > On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote: > > > If I were a sysadmin, I'd rather opt for something like > > > finegrained timestamps + lazytime (if I needed

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
nk? > > > My plan was to take a stab at doing this for a later kernel release. > > Ok. If it works out, then we may be able to eventually remove the mount option, but that is a separate project altogether. -- Jeff Layton ___ L

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
d but > v6.6 needs to stabilize so anything that requires more significant work > is not an option. Oh, absolutely. I wasn't proposing to do that work for v6.6. For that, we absolutely either need the mount option or to just revert the mgtime conversions. My plan was to take a

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
t; > diff --git a/include/linux/fs.h b/include/linux/fs.h > > index 4aeb3fa11927..03e415fb3a7c 100644 > > --- a/include/linux/fs.h > > +++ b/include/linux/fs.h > > @@ -1114,6 +1114,7 @@ extern int send_sigurg(struct fown_struct *fown); > > #define SB_NODE

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
gt;  #define SB_NOATIME BIT(10) /* Do not update access times. */ > @@ -2105,6 +2106,7 @@ static inline bool sb_rdonly(const struct super_block > *sb) { return sb->s_flags >   ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) >  #define IS_MANDL

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 13:10 -0700, Paul Eggert wrote: > On 2023-09-19 09:31, Jeff Layton wrote: > > The typical case for make > > timestamp comparisons is comparing source files vs. a build target. If > > those are being written nearly simultaneously, then that

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 16:52 +0200, Bruno Haible wrote: > Jeff Layton wrote: > > I'm not sure what we can do for this test. The nap() function is making > > an assumption that the timestamp granularity will be constant, and that > > isn't necessarily the case now. > >

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 13:04 +0200, Jan Kara wrote: > On Tue 19-09-23 15:05:24, Xi Ruoyao wrote: > > On Mon, 2023-08-07 at 15:38 -0400, Jeff Layton wrote: > > > Enable multigrain timestamps, which should ensure that there is an > > > apparent change to the timestamp w

Re: [f2fs-dev] [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-08-29 Thread Jeff Layton
On Wed, 2023-08-30 at 01:19 +0100, Al Viro wrote: > On Wed, Jul 05, 2023 at 02:58:11PM -0400, Jeff Layton wrote: > > > + * POSIX mandates that the old and new parent directories have their ctime > > and > > + * mtime updated, and that inodes of @old_dentry and @new_de

Re: [f2fs-dev] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Jeff Layton
On Wed, 2023-08-30 at 01:02 +0100, Al Viro wrote: > On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote: > > On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > > > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > > > generic_fillattr just f

Re: [f2fs-dev] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Jeff Layton
On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > generic_fillattr just fills in the entire stat struct indiscriminately > > today, copying data from the inode. There is at least one attribute > > (STATX_CH

Re: [f2fs-dev] [PATCH v7 05/13] fat: make fat_update_time get its own timestamp

2023-08-09 Thread Jeff Layton
On Thu, 2023-08-10 at 05:14 +0900, OGAWA Hirofumi wrote: > Jeff Layton writes: > > > When you say it "doesn't work the same", what do you mean, specifically? > > I had to make some allowances for the fact that FAT is substantially > > different in its timestamp

Re: [f2fs-dev] [PATCH v7 08/13] fs: drop the timespec64 argument from update_time

2023-08-09 Thread Jeff Layton
at has this in it? > > -Mike > > On Wed, Aug 9, 2023 at 8:32 AM Christian Brauner wrote: > > > > On Mon, Aug 07, 2023 at 03:38:39PM -0400, Jeff Layton wrote: > > > Now that all of the update_time operations are prepared for it, we can > > > drop the timesp

Re: [f2fs-dev] [PATCH v7 05/13] fat: make fat_update_time get its own timestamp

2023-08-09 Thread Jeff Layton
On Thu, 2023-08-10 at 03:31 +0900, OGAWA Hirofumi wrote: > Jeff Layton writes: > > > On Thu, 2023-08-10 at 02:44 +0900, OGAWA Hirofumi wrote: > > > Jeff Layton writes: > > > > > That would be wrong. The problem is that we're changing how update_time > &g

Re: [f2fs-dev] [PATCH v7 05/13] fat: make fat_update_time get its own timestamp

2023-08-09 Thread Jeff Layton
On Thu, 2023-08-10 at 02:44 +0900, OGAWA Hirofumi wrote: > Jeff Layton writes: > > > On Thu, 2023-08-10 at 00:17 +0900, OGAWA Hirofumi wrote: > > > Jan Kara writes: > > [...] > > > My mistake re: lazytime vs. relatime, but Jan is correct th

Re: [f2fs-dev] [PATCH v7 05/13] fat: make fat_update_time get its own timestamp

2023-08-09 Thread Jeff Layton
the clock. Given the way that the mtime and ctime are smooshed together in FAT, that seemed reasonable. Is there a particular case or flag combination you're concerned about here? -- Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v7 05/13] fat: make fat_update_time get its own timestamp

2023-08-09 Thread Jeff Layton
On Wed, 2023-08-09 at 22:36 +0900, OGAWA Hirofumi wrote: > Jeff Layton writes: > > > On Wed, 2023-08-09 at 17:37 +0900, OGAWA Hirofumi wrote: > > > Jeff Layton writes: > > > > > > > Also, it may be that things have changed by the time we get to call

Re: [f2fs-dev] [PATCH v7 05/13] fat: make fat_update_time get its own timestamp

2023-08-09 Thread Jeff Layton
On Wed, 2023-08-09 at 17:37 +0900, OGAWA Hirofumi wrote: > Jeff Layton writes: > > > Also, it may be that things have changed by the time we get to calling > > fat_update_time after checking inode_needs_update_time. Ensure that we > > attempt the i_version bump if any

[f2fs-dev] [PATCH v7 13/13] btrfs: convert to multigrain timestamps

2023-08-07 Thread Jeff Layton
stores. Just have it overwrite the timestamps unconditionally. Signed-off-by: Jeff Layton Acked-by: David Sterba --- fs/btrfs/file.c | 24 fs/btrfs/super.c | 5 +++-- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c

[f2fs-dev] [PATCH v7 00/13] fs: implement multigrain timestamps

2023-08-07 Thread Jeff Layton
this commit: 525deaeb2fbf gfs2: fix timestamp handling on quota inodes base-commit: cf22d118b89a09a0160586412160d89098f7c4c7 Signed-off-by: Jeff Layton --- Changes in v7: - change update_time operation to fetch the current time itself - don't modify current_time operation. Leave it always returning

[f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-08-07 Thread Jeff Layton
Enable multigrain timestamps, which should ensure that there is an apparent change to the timestamp whenever it has been written after being actively observed via getattr. For ext4, we only need to enable the FS_MGTIME flag. Acked-by: Theodore Ts'o Reviewed-by: Jan Kara Signed-off-by: Jeff

[f2fs-dev] [PATCH v7 11/13] xfs: switch to multigrain timestamps

2023-08-07 Thread Jeff Layton
. Have that function unconditionally bump the ctime, and ASSERT that XFS_ICHGTIME_CHG is always set. Acked-by: "Darrick J. Wong" Signed-off-by: Jeff Layton --- fs/xfs/libxfs/xfs_trans_inode.c | 6 +++--- fs/xfs/xfs_iops.c | 8 fs/xfs/xfs_super.c | 2 +

[f2fs-dev] [PATCH v7 10/13] tmpfs: add support for multigrain timestamps

2023-08-07 Thread Jeff Layton
Enable multigrain timestamps, which should ensure that there is an apparent change to the timestamp whenever it has been written after being actively observed via getattr. tmpfs only requires the FS_MGTIME flag. Reviewed-by: Jan Kara Signed-off-by: Jeff Layton --- mm/shmem.c | 2 +- 1 file

[f2fs-dev] [PATCH v7 08/13] fs: drop the timespec64 argument from update_time

2023-08-07 Thread Jeff Layton
Now that all of the update_time operations are prepared for it, we can drop the timespec64 argument from the update_time operation. Do that and remove it from some associated functions like inode_update_time and inode_needs_update_time. Signed-off-by: Jeff Layton --- fs/bad_inode.c

[f2fs-dev] [PATCH v7 06/13] ubifs: have ubifs_update_time use inode_update_timestamps

2023-08-07 Thread Jeff Layton
In later patches, we're going to drop the "now" parameter from the update_time operation. Prepare ubifs for this, by having it use the new inode_update_timestamps helper. Signed-off-by: Jeff Layton --- fs/ubifs/file.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-)

[f2fs-dev] [PATCH v7 07/13] xfs: have xfs_vn_update_time gets its own timestamp

2023-08-07 Thread Jeff Layton
In later patches we're going to drop the "now" parameter from the update_time operation. Prepare XFS for this by reworking how it fetches timestamps and sets them in the inode. Ensure that we update the ctime even if only S_MTIME is set. Signed-off-by: Jeff Layton --- fs/xfs/xfs_i

[f2fs-dev] [PATCH v7 09/13] fs: add infrastructure for multigrain timestamps

2023-08-07 Thread Jeff Layton
. Filesytems can opt into this behavior by setting the FS_MGTIME flag in the fstype. Filesystems that don't set this flag will continue to use coarse-grained timestamps. Later patches will convert individual filesystems to use the new infrastructure. Signed-off-by: Jeff Layton --- fs/inode.c | 82

[f2fs-dev] [PATCH v7 04/13] btrfs: have it use inode_update_timestamps

2023-08-07 Thread Jeff Layton
In later patches, we're going to drop the "now" argument from the update_time operation. Have btrfs_update_time use the new inode_update_timestamps helper to fetch a new timestamp and update it properly. Signed-off-by: Jeff Layton --- fs/btrfs/inode.c | 9 + 1 file changed, 1

[f2fs-dev] [PATCH v7 05/13] fat: make fat_update_time get its own timestamp

2023-08-07 Thread Jeff Layton
ime we get to calling fat_update_time after checking inode_needs_update_time. Ensure that we attempt the i_version bump if any of the S_* flags besides S_ATIME are set. Signed-off-by: Jeff Layton --- fs/fat/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fat/misc.

[f2fs-dev] [PATCH v7 03/13] fs: drop the timespec64 arg from generic_update_time

2023-08-07 Thread Jeff Layton
me callers of generic_update_time need to know what timestamps were actually updated. Change it to return an S_* flag mask to indicate that and rework the callers to expect it. Signed-off-by: Jeff Layton --- fs/gfs2/inode.c | 3 +- fs/inode.c | 84 +--

[f2fs-dev] [PATCH v7 02/13] fs: pass the request_mask to generic_fillattr

2023-08-07 Thread Jeff Layton
-by: "Paulo Alcantara (SUSE)" Reviewed-by: Jan Kara Signed-off-by: Jeff Layton --- fs/9p/vfs_inode.c | 4 ++-- fs/9p/vfs_inode_dotl.c | 4 ++-- fs/afs/inode.c | 2 +- fs/btrfs/inode.c| 2 +- fs/ceph/inode.c | 2 +- fs/coda/inode.c | 3 ++- f

[f2fs-dev] [PATCH v7 01/13] fs: remove silly warning from current_time

2023-08-07 Thread Jeff Layton
An inode with no superblock? Unpossible! Signed-off-by: Jeff Layton --- fs/inode.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index d4ab92233062..3fc251bfaf73 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2495,12 +2495,6 @@ struct timespec64 current_time

Re: [f2fs-dev] [PATCH v6 2/7] fs: add infrastructure for multigrain timestamps

2023-08-02 Thread Jeff Layton
On Wed, 2023-08-02 at 21:35 +0200, Jan Kara wrote: > On Tue 25-07-23 10:58:15, Jeff Layton wrote: > > The VFS always uses coarse-grained timestamps when updating the ctime > > and mtime after a change. This has the benefit of allowing filesystems > > to optimize away a lot m

Re: [f2fs-dev] [PATCH v6 5/7] xfs: switch to multigrain timestamps

2023-08-02 Thread Jeff Layton
On Wed, 2023-08-02 at 10:48 -0700, Darrick J. Wong wrote: > On Tue, Jul 25, 2023 at 10:58:18AM -0400, Jeff Layton wrote: > > Enable multigrain timestamps, which should ensure that there is an > > apparent change to the timestamp whenever it has been written after > > being

Re: [f2fs-dev] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-07-26 Thread Jeff Layton
On Wed, 2023-07-26 at 17:40 +0800, Joseph Qi wrote: > > On 7/25/23 10:58 PM, Jeff Layton wrote: > > generic_fillattr just fills in the entire stat struct indiscriminately > > today, copying data from the inode. There is at least one attribute > > (STATX_CHANGE_COOKIE) th

Re: [f2fs-dev] [PATCH v6 3/7] tmpfs: bump the mtime/ctime/iversion when page becomes writeable

2023-07-26 Thread Jeff Layton
On Tue, 2023-07-25 at 18:39 -0700, Hugh Dickins wrote: > On Tue, 25 Jul 2023, Jeff Layton wrote: > > > Most filesystems that use the pagecache will update the mtime, ctime, > > and change attribute when a page becomes writeable. Add a page_mkwrite > > operation for tmpfs

[f2fs-dev] [PATCH v6 7/7] btrfs: convert to multigrain timestamps

2023-07-25 Thread Jeff Layton
stores. Just have it overwrite the timestamps unconditionally. Signed-off-by: Jeff Layton --- fs/btrfs/file.c | 24 fs/btrfs/super.c | 5 +++-- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index d7a9ece7a40b

[f2fs-dev] [PATCH v6 6/7] ext4: switch to multigrain timestamps

2023-07-25 Thread Jeff Layton
Enable multigrain timestamps, which should ensure that there is an apparent change to the timestamp whenever it has been written after being actively observed via getattr. For ext4, we only need to enable the FS_MGTIME flag. Signed-off-by: Jeff Layton --- fs/ext4/super.c | 2 +- 1 file changed

[f2fs-dev] [PATCH v6 5/7] xfs: switch to multigrain timestamps

2023-07-25 Thread Jeff Layton
. Have that function unconditionally bump the ctime, and ASSERT that XFS_ICHGTIME_CHG is always set. Signed-off-by: Jeff Layton --- fs/xfs/libxfs/xfs_trans_inode.c | 6 +++--- fs/xfs/xfs_iops.c | 4 ++-- fs/xfs/xfs_super.c | 2 +- 3 files changed, 6 insertions(+), 6

[f2fs-dev] [PATCH v6 4/7] tmpfs: add support for multigrain timestamps

2023-07-25 Thread Jeff Layton
Enable multigrain timestamps, which should ensure that there is an apparent change to the timestamp whenever it has been written after being actively observed via getattr. tmpfs only requires the FS_MGTIME flag. Signed-off-by: Jeff Layton --- mm/shmem.c | 2 +- 1 file changed, 1 insertion

[f2fs-dev] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-07-25 Thread Jeff Layton
a request_mask argument to generic_fillattr and have most callers just pass in the value that is passed to getattr. Have other callers (e.g. ksmbd) just pass in STATX_BASIC_STATS. Also move the setting of STATX_CHANGE_COOKIE into generic_fillattr. Signed-off-by: Jeff Layton --- fs/9p/vfs_inode.c

[f2fs-dev] [PATCH v6 0/7] fs: implement multigrain timestamps

2023-07-25 Thread Jeff Layton
be willing to pick these up for now? Alternately, I can feed them there via the iversion branch that Stephen is already pulling in from my tree. Signed-off-by: Jeff Layton base-commit: cf22d118b89a09a0160586412160d89098f7c4c7 --- Changes in v6: - drop the patch that removed XFS_ICHGTIME_CHG

[f2fs-dev] [PATCH v6 3/7] tmpfs: bump the mtime/ctime/iversion when page becomes writeable

2023-07-25 Thread Jeff Layton
Most filesystems that use the pagecache will update the mtime, ctime, and change attribute when a page becomes writeable. Add a page_mkwrite operation for tmpfs and just use it to bump the mtime, ctime and change attribute. This fixes xfstest generic/080 on tmpfs. Signed-off-by: Jeff Layton

[f2fs-dev] [PATCH v6 2/7] fs: add infrastructure for multigrain timestamps

2023-07-25 Thread Jeff Layton
. Filesytems can opt into this behavior by setting the FS_MGTIME flag in the fstype. Filesystems that don't set this flag will continue to use coarse-grained timestamps. Later patches will convert individual filesystems to use the new infrastructure. Signed-off-by: Jeff Layton --- fs/inode.c | 98

Re: [f2fs-dev] [PATCH v2 34/47] nfsd: dynamically allocate the nfsd-client shrinker

2023-07-24 Thread Jeff Layton
gister(nn->nfsd_client_shrinker); > + > return 0; > > err_shrinker: > @@ -8228,7 +8232,7 @@ nfs4_state_shutdown_net(struct net *net) > struct list_head *pos, *next, reaplist; > struct nfsd_net *nn = net_generic(net, nfsd_net_i

Re: [f2fs-dev] [PATCH v2 35/47] nfsd: dynamically allocate the nfsd-reply shrinker

2023-07-24 Thread Jeff Layton
n = container_of(shrink, > - struct nfsd_net, nfsd_reply_cache_shrinker); > + struct nfsd_net *nn = shrink->private_data; > > return atomic_read(>num_drc_entries); > } > @@ -342,8 +344,7 @@ nfsd_reply_cache_count(struct shrinker

[f2fs-dev] [PATCH v5 1/8] fs: pass the request_mask to generic_fillattr

2023-07-13 Thread Jeff Layton
a request_mask argument to generic_fillattr and have most callers just pass in the value that is passed to getattr. Have other callers (e.g. ksmbd) just pass in STATX_BASIC_STATS. Also move the setting of STATX_CHANGE_COOKIE into generic_fillattr. Signed-off-by: Jeff Layton --- fs/9p/vfs_inode.c

[f2fs-dev] [PATCH v5 0/8] fs: implement multigrain timestamps

2023-07-13 Thread Jeff Layton
infrastructure API. Does this look reasonable? Am I missing any races? Signed-off-by: Jeff Layton base-commit: cf22d118b89a09a0160586412160d89098f7c4c7 --- Jeff Layton (8): fs: pass the request_mask to generic_fillattr fs: add infrastructure for multigrain timestamps tmpfs: bump

[f2fs-dev] [PATCH v5 8/8] btrfs: convert to multigrain timestamps

2023-07-13 Thread Jeff Layton
stores. Just have it overwrite the timestamps unconditionally. Signed-off-by: Jeff Layton --- fs/btrfs/file.c | 24 fs/btrfs/super.c | 5 +++-- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index d7a9ece7a40b

[f2fs-dev] [PATCH v5 7/8] ext4: switch to multigrain timestamps

2023-07-13 Thread Jeff Layton
Enable multigrain timestamps, which should ensure that there is an apparent change to the timestamp whenever it has been written after being actively observed via getattr. For ext4, we only need to enable the FS_MGTIME flag. Signed-off-by: Jeff Layton --- fs/ext4/super.c | 2 +- 1 file changed

[f2fs-dev] [PATCH v5 3/8] tmpfs: bump the mtime/ctime/iversion when page becomes writeable

2023-07-13 Thread Jeff Layton
Most filesystems that use the pagecache will update the mtime, ctime, and change attribute when a page becomes writeable. Add a page_mkwrite operation for tmpfs and just use it to bump the mtime, ctime and change attribute. This fixes xfstest generic/080 on tmpfs. Signed-off-by: Jeff Layton

[f2fs-dev] [PATCH v5 6/8] xfs: switch to multigrain timestamps

2023-07-13 Thread Jeff Layton
. Have that function unconditionally bump the ctime, and warn if XFS_ICHGTIME_CHG is ever not set. Signed-off-by: Jeff Layton --- fs/xfs/libxfs/xfs_trans_inode.c | 6 +++--- fs/xfs/xfs_iops.c | 4 ++-- fs/xfs/xfs_super.c | 2 +- 3 files changed, 6 insertions(+), 6

[f2fs-dev] [PATCH v5 4/8] tmpfs: add support for multigrain timestamps

2023-07-13 Thread Jeff Layton
Enable multigrain timestamps, which should ensure that there is an apparent change to the timestamp whenever it has been written after being actively observed via getattr. tmpfs only requires the FS_MGTIME flag. Signed-off-by: Jeff Layton --- mm/shmem.c | 2 +- 1 file changed, 1 insertion

[f2fs-dev] [PATCH v5 5/8] xfs: XFS_ICHGTIME_CREATE is unused

2023-07-13 Thread Jeff Layton
Nothing ever sets this flag, which makes sense since the create time is set at inode instantiation and is never changed. Remove it and the handling of it in xfs_trans_ichgtime. Signed-off-by: Jeff Layton --- fs/xfs/libxfs/xfs_shared.h | 2 -- fs/xfs/libxfs/xfs_trans_inode.c | 2 -- 2 files

[f2fs-dev] [PATCH v5 2/8] fs: add infrastructure for multigrain timestamps

2023-07-13 Thread Jeff Layton
. Filesytems can opt into this behavior by setting the FS_MGTIME flag in the fstype. Filesystems that don't set this flag will continue to use coarse-grained timestamps. Later patches will convert individual filesystems to use the new infrastructure. Signed-off-by: Jeff Layton --- fs/inode.c | 98

Re: [f2fs-dev] [PATCH v2 00/89] fs: new accessors for inode->i_ctime

2023-07-10 Thread Jeff Layton
On Mon, 2023-07-10 at 14:35 +0200, Christian Brauner wrote: > On Fri, Jul 07, 2023 at 08:42:31AM -0400, Jeff Layton wrote: > > On Wed, 2023-07-05 at 14:58 -0400, Jeff Layton wrote: > > > v2: > > > - prepend patches to add missing ctime updates > > > - add sim

Re: [f2fs-dev] [PATCH v2 00/89] fs: new accessors for inode->i_ctime

2023-07-07 Thread Jeff Layton
On Wed, 2023-07-05 at 14:58 -0400, Jeff Layton wrote: > v2: > - prepend patches to add missing ctime updates > - add simple_rename_timestamp helper function > - rename ctime accessor functions as inode_get_ctime/inode_set_ctime_* > - drop individual inode_ctime_set_{sec,nsec} he

Re: [f2fs-dev] [apparmor] [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-07-07 Thread Jeff Layton
On Thu, 2023-07-06 at 21:02 +, Seth Arnold wrote: > On Wed, Jul 05, 2023 at 08:04:41PM -0400, Jeff Layton wrote: > > > > I don't believe it's an issue. I've seen nothing in the POSIX spec that > > mandates that timestamp updates to different inodes involved in an

Re: [f2fs-dev] [PATCH v2 00/89] fs: new accessors for inode->i_ctime

2023-07-06 Thread Jeff Layton
On Thu, 2023-07-06 at 10:16 -0500, Eric W. Biederman wrote: > Jeff Layton writes: > > > On Wed, 2023-07-05 at 14:58 -0400, Jeff Layton wrote: > > > v2: > > > - prepend patches to add missing ctime updates > > > - add simple_rename_timestamp helper function

Re: [f2fs-dev] [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-07-05 Thread Jeff Layton
On Thu, 2023-07-06 at 08:19 +0900, Damien Le Moal wrote: > On 7/6/23 03:58, Jeff Layton wrote: > > A rename potentially involves updating 4 different inode timestamps. Add > > a function that handles the details sanely, and convert the libfs.c > > callers to use it. > &g

Re: [f2fs-dev] [PATCH v2 00/89] fs: new accessors for inode->i_ctime

2023-07-05 Thread Jeff Layton
On Wed, 2023-07-05 at 14:58 -0400, Jeff Layton wrote: > v2: > - prepend patches to add missing ctime updates > - add simple_rename_timestamp helper function > - rename ctime accessor functions as inode_get_ctime/inode_set_ctime_* > - drop individual inode_ctime_set_{sec,nsec} he

[f2fs-dev] [PATCH v2 43/92] f2fs: convert to ctime accessor functions

2023-07-05 Thread Jeff Layton
In later patches, we're going to change how the inode's ctime field is used. Switch to using accessor functions instead of raw accesses of inode->i_ctime. Signed-off-by: Jeff Layton --- fs/f2fs/dir.c | 8 fs/f2fs/f2fs.h | 4 +++- fs/f2fs/file.c |

[f2fs-dev] [PATCH v2 92/92] fs: rename i_ctime field to __i_ctime

2023-07-05 Thread Jeff Layton
Now that everything in-tree is converted to use the accessor functions, rename the i_ctime field in the inode to discourage direct access. Signed-off-by: Jeff Layton --- include/linux/fs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/fs.h b/include

[f2fs-dev] [PATCH v2 07/92] fs: add ctime accessors infrastructure

2023-07-05 Thread Jeff Layton
ses of the inode->i_ctime field from the kernel. Add new accessor functions for the ctime that we use to replace them. Reviewed-by: Jan Kara Reviewed-by: Luis Chamberlain Signed-off-by: Jeff Layton --- fs/inode.c | 16 include/linux/fs.

[f2fs-dev] [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-07-05 Thread Jeff Layton
A rename potentially involves updating 4 different inode timestamps. Add a function that handles the details sanely, and convert the libfs.c callers to use it. Signed-off-by: Jeff Layton --- fs/libfs.c | 36 +++- include/linux/fs.h | 2 ++ 2 files

[f2fs-dev] [PATCH v2 00/89] fs: new accessors for inode->i_ctime

2023-07-05 Thread Jeff Layton
+ inode_set_ctime_current() ) :: cocci/ctime5.cocci :: // convert the remaining i_ctime accesses @@ struct inode *inode; @@ - inode->i_ctime + inode_get_ctime(inode) Jeff Layton (92): ibmvmc: update ctime in conjunction with mtime on write bfs: update ctime in additio

Re: [f2fs-dev] [PATCH 01/79] fs: add ctime accessors infrastructure

2023-06-22 Thread Jeff Layton
On Thu, 2023-06-22 at 09:46 +0900, Damien Le Moal wrote: > On 6/21/23 23:45, Jeff Layton wrote: > > struct timespec64 has unused bits in the tv_nsec field that can be used > > for other purposes. In future patches, we're going to change how the > > inode->i_ctime is ac

Re: [f2fs-dev] [PATCH 00/79] fs: new accessors for inode->i_ctime

2023-06-21 Thread Jeff Layton
On Wed, 2023-06-21 at 15:21 -0400, Steven Rostedt wrote: > On Wed, 21 Jun 2023 10:45:05 -0400 > Jeff Layton wrote: > > > Most of this conversion was done via coccinelle, with a few of the more > > non-standard accesses done by hand. There should be no behavioral >

Re: [f2fs-dev] [PATCH 01/79] fs: add ctime accessors infrastructure

2023-06-21 Thread Jeff Layton
On Wed, 2023-06-21 at 14:19 -0400, Tom Talpey wrote: > On 6/21/2023 2:01 PM, Jeff Layton wrote: > > On Wed, 2023-06-21 at 13:29 -0400, Tom Talpey wrote: > > > On 6/21/2023 10:45 AM, Jeff Layton wrote: > > > > struct timespec64 has unused bits in the tv_nsec field that

Re: [f2fs-dev] [PATCH 01/79] fs: add ctime accessors infrastructure

2023-06-21 Thread Jeff Layton
On Wed, 2023-06-21 at 13:29 -0400, Tom Talpey wrote: > On 6/21/2023 10:45 AM, Jeff Layton wrote: > > struct timespec64 has unused bits in the tv_nsec field that can be used > > for other purposes. In future patches, we're going to change how the > > inode->i_ctime is ac

[f2fs-dev] [PATCH 79/79] fs: rename i_ctime field to __i_ctime

2023-06-21 Thread Jeff Layton
Now that everything in-tree is converted to use the accessor functions, rename the i_ctime field in the inode to make its accesses more self-documenting. Signed-off-by: Jeff Layton --- include/linux/fs.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include

[f2fs-dev] [PATCH 30/79] f2fs: switch to new ctime accessors

2023-06-21 Thread Jeff Layton
In later patches, we're going to change how the ctime.tv_nsec field is utilized. Switch to using accessor functions instead of raw accesses of inode->i_ctime. Signed-off-by: Jeff Layton --- fs/f2fs/dir.c | 8 fs/f2fs/f2fs.h | 5 - fs/f2fs/file.c |

[f2fs-dev] [PATCH 00/79] fs: new accessors for inode->i_ctime

2023-06-21 Thread Jeff Layton
n patches to the appropriate maintainers. Please send Acked-by's or Reviewed-by's if you can. The intent is to merge these as a set (probably in v6.6). Let me know if that causes conflicts though, and we can work it out. This is based on top of linux-next as of yesterday. Jeff Layton (79): fs: add ctime

[f2fs-dev] [PATCH 01/79] fs: add ctime accessors infrastructure

2023-06-21 Thread Jeff Layton
ses of the inode->i_ctime field from the kernel. Add new accessor functions for the ctime that we can use to replace them. Signed-off-by: Jeff Layton --- fs/inode.c | 16 ++ include/linux/fs.h | 53 +- 2 files changed, 68 insertions

Re: [f2fs-dev] [PATCH v3 08/23] ceph: Convert ceph_writepages_start() to use filemap_get_folios_tag()

2022-10-28 Thread Jeff Layton
continue; > wait_on_page_writeback(page); > } > - pagevec_release(); > + folio_batch_release(); > cond_resched(); > } > } I took a brief look and this looks like a fairly straightforward conversion. It definitely needs testing however. The hope was to get ceph converted over to using the netfs write helpers, but that's taking a lot longer than expected. It's really up to Xiubo at this point, but I don't have an issue in principle with taking this patch in before the netfs conversion, particularly if it's blocking other work. Acked-by: Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v2 08/23] ceph: Convert ceph_writepages_start() to use filemap_get_folios_tag()

2022-09-30 Thread Jeff Layton
(nr = pagevec_lookup_tag(, mapping, , > - PAGECACHE_TAG_WRITEBACK))) { > + (nr = filemap_get_folios_tag(mapping, , > + (pgoff_t)-1, > + PAGECACHE_TAG_WRITEBACK, > + ))) { > for (i = 0; i < nr; i++) { > - page = pvec.pages[i]; > - if (page_snap_context(page) != snapc) > + folio = fbatch.folios[i]; > + if (page_snap_context(>page) != > + snapc) > continue; > - wait_on_page_writeback(page); > + folio_wait_writeback(folio); > } > - pagevec_release(); > + folio_batch_release(); > cond_resched(); > } > } We have some work in progress to add write helpers to netfslib. Once we get those in place, we plan to convert ceph to use them. At that point ceph_writepages just goes away. I think it'd be best to just wait for that and to just ensure that netfslib uses filemap_get_folios_tag and the like where appropriate. -- Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v4 0/9] make statx() return DIO alignment information

2022-08-26 Thread Jeff Layton
35d16b17da1008d753d28 Hi Eric, Can I ask what your plans are with this set? I didn't see it in linux-next yet, so I wasn't sure when you were looking to get it merged. I'm working on patches to add a new statx field for the i_version counter as well and I want to make sure that our work doesn't collide. Thanks, -- Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion

2022-03-04 Thread Jeff Layton
On Fri, 2022-03-04 at 13:47 +1100, NeilBrown wrote: > On Thu, 24 Feb 2022, Jeff Layton wrote: > > On Thu, 2022-02-24 at 16:41 +1100, NeilBrown wrote: > > > On Thu, 24 Feb 2022, Jeff Layton wrote: > > > > On Tue, 2022-02-22 at 14:17 +1100, NeilBrown wrote: > &g

Re: [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion

2022-02-24 Thread Jeff Layton
On Thu, 2022-02-24 at 16:41 +1100, NeilBrown wrote: > On Thu, 24 Feb 2022, Jeff Layton wrote: > > On Tue, 2022-02-22 at 14:17 +1100, NeilBrown wrote: > > > The bdi congestion tracking in not widely used and will be removed. > > > > > > CEPHfs is one of a s

Re: [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion

2022-02-23 Thread Jeff Layton
> fsc->have_copy_from2 = true; > > atomic_long_set(>writeback_count, 0); > + fsc->write_congested = false; > > err = -ENOMEM; > /* > diff --git a/fs/ceph/super.h b/fs/ceph/super.h > index 67f145e1ae7a..0bd97aea2319 100644 > --- a/fs/ceph/super.h > +++ b/fs/ceph/super.h > @@ -121,6 +121,7 @@ struct ceph_fs_client { > struct ceph_mds_client *mdsc; > > atomic_long_t writeback_count; > + bool write_congested; > > struct workqueue_struct *inode_wq; > struct workqueue_struct *cap_wq; > > -- Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  1   2   >