[PATCH] fs: convert a pile of fsync routines to errseq_t based reporting

2017-07-28 Thread Jeff Layton
From: Jeff Layton <jlay...@redhat.com> This patch converts most of the in-kernel filesystems that do writeback out of the pagecache to report errors using the errseq_t-based infrastructure that was recently added. This allows them to report errors once for each open file description.

Re: [PATCH RESEND v11 7/8] open: openat2(2) syscall

2019-08-28 Thread Jeff Layton
flag. If all these values are passed by individual arguments, you can't add one later without adding yet another syscall. Using a struct for this allows this to be extended later, OTOH. You can extend it, and add a flag that tells the kernel that it can access the new field. No new syscall required. -- Jeff Layton

Re: [PATCH v12 11/12] open: openat2(2) syscall

2019-09-07 Thread Jeff Layton
;.." > + be scoped inside the dirfd > + (similar to chroot(2)). */ > + > +/* how->upgrade flags for openat2(2). */ > +/* First bit is reserved for a future UPGRADE_NOEXEC flag. */ > +#define UPGRADE_NOREAD 0x02 /* Block re-opening with MAY_READ. > */ > +#define UPGRADE_NOWRITE 0x04 /* Block re-opening with > MAY_WRITE. */ > > #endif /* _UAPI_LINUX_FCNTL_H */ -- Jeff Layton

Re: [PATCH 4/7] arch: Remove leftovers from mandatory file locking

2021-11-05 Thread Jeff Layton
FIG_EXT2_FS_SECURITY=y > CONFIG_EXT3_FS=y > CONFIG_EXT3_FS_POSIX_ACL=y > CONFIG_EXT3_FS_SECURITY=y > -# CONFIG_MANDATORY_FILE_LOCKING is not set > CONFIG_ISO9660_FS=y > CONFIG_JOLIET=y > CONFIG_PROC_KCORE=y Reviewed-by: Jeff Layton

Re: [PATCH 4/5] uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h

2022-01-12 Thread Jeff Layton
efinitions. It's hard to imagine there are many programs that care whether these other symbols are defined or not. You can add this to the original patch: Acked-by: Jeff Layton

Re: [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: [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: [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: [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: [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: [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

[PATCH v2 03/89] spufs: 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 --- arch/powerpc/platforms/cell/spufs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index

[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

[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

[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

[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

[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

Re: [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 > >

[PATCH 03/87] arch/powerpc/platforms/cell/spufs: convert to new inode {a,m}time accessors

2023-09-28 Thread Jeff Layton
Signed-off-by: Jeff Layton --- arch/powerpc/platforms/cell/spufs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 38c5be34c895..10c1320adfd0 100644 --- a/arch/powerpc/platforms

[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

[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

[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

[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

[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

[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

Re: [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: [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: [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

[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

[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.

[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

Re: [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

[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

[PATCH v2 15/92] spufs: 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. Acked-by: Jeremy Kerr Reviewed-by: Jan Kara Signed-off-by: Jeff Layton --- arch/powerpc/platforms/cell/spufs/inode.c | 2 +- 1 f

Re: [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: [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

[PATCH 02/79] spufs: 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 --- arch/powerpc/platforms/cell/spufs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[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

[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

Re: [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

[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: [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: [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: [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 >