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.
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
;.."
> + 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
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
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
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
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.
>
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
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
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
'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
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
% 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
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
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
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
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
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
> >
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
+ 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
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
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
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
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
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
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
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
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
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
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
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
>
44 matches
Mail list logo