;
> Documentation/filesystems/porting.rst?
Also, an entry for ->mmap_prepare in Documentation/filesystems/vfs.rst
would be good.
I went there first to understand what the requirements of mmap_prepare
are, but there is nothing.
--
Jeff Layton
= RPCSVC_MAXPAGES;
> }
>
> - for (filled = 0; filled < pages; filled = ret) {
> - ret = alloc_pages_bulk(GFP_KERNEL, pages, rqstp->rq_pages);
> - if (ret > filled)
> + for (filled = 0; filled < pages; filled += ret) {
> + ret = alloc_pages_bulk(GFP_KERNEL, pages - filled,
> +rqstp->rq_pages + filled);
> + if (ret)
> /* Made progress, don't sleep yet */
> continue;
>
> @@ -674,7 +675,7 @@ static bool svc_alloc_arg(struct svc_rqst *rqstp)
> set_current_state(TASK_RUNNING);
> return false;
> }
> - trace_svc_alloc_arg_err(pages, ret);
> + trace_svc_alloc_arg_err(pages, filled);
> memalloc_retry_wait(GFP_KERNEL);
> }
> rqstp->rq_page_end = &rqstp->rq_pages[pages];
I agree that the API is cumbersome and weird as it is today. For the
sunrpc parts:
Acked-by: Jeff Layton
rom the commit log problem Andreas pointed out in patch #2, this
looks good. Assuming that's fixed:
Reviewed-by: Jeff Layton
files: add missing lock protection when polling
>
> fs/cachefiles/daemon.c | 4 ++--
> fs/cachefiles/internal.h | 3 +++
> fs/cachefiles/ondemand.c | 52 +++++++-
> 3 files changed, 51 insertions(+), 8 deletions(-)
>
The set itself looks fairly straightforward, but I don't know this code
well enough to give it a proper review.
Acked-by: Jeff Layton
req->error = -EIO;
> + complete(&req->done);
> + __xa_erase(&cache->reqs, index);
> + }
> + }
> + xa_unlock(&cache->reqs);
> }
>
> int cachefiles_ondemand_init_obj_info(struct cachefiles_object
> *object,
--
Jeff Layton
On Mon, 2024-05-20 at 20:42 +0800, Baokun Li wrote:
> On 2024/5/20 18:04, Jeff Layton wrote:
> > On Mon, 2024-05-20 at 12:06 +0800, Baokun Li wrote:
> > > Hi Jeff,
> > >
> > > Thank you very much for your review!
> > >
> > > On 2024/5/19 19:1
On Mon, 2024-05-20 at 12:06 +0800, Baokun Li wrote:
> Hi Jeff,
>
> Thank you very much for your review!
>
> On 2024/5/19 19:11, Jeff Layton wrote:
> > On Wed, 2024-05-15 at 20:51 +0800, libao...@huaweicloud.com wrote:
> > > From: Baokun Li
> > >
>
xas_clear_mark(&xas, XA_FREE_MARK);
> - xas_set_mark(&xas, CACHEFILES_REQ_NEW);
> + if (xas_valid(&xas)) {
> + cache->msg_id_next = xas.xa_index + 1;
If you have a long-standing stuck request, could this counter wrap
around and you still end up with reuse? Maybe this should be using
ida_alloc/free instead, which would prevent that too?
> + xas_clear_mark(&xas, XA_FREE_MARK);
> + xas_set_mark(&xas, CACHEFILES_REQ_NEW);
> + }
> xas_unlock(&xas);
> } while (xas_nomem(&xas, GFP_KERNEL));
>
--
Jeff Layton
| 3 +-
> fs/cachefiles/internal.h | 5 +
> fs/cachefiles/ondemand.c | 218 ++
> include/trace/events/cachefiles.h | 8 +-
> 4 files changed, 177 insertions(+), 57 deletions(-)
>
Looks like most of these are fixes inside the ondemand code, which I
don't have the greatest grasp of, so...
Acked-by: Jeff Layton
/9p/client.c | 49 +++
> net/9p/trans_fd.c| 1 -
> 40 files changed, 2492 insertions(+), 1906 deletions(-)
> delete mode 100644 fs/netfs/output.c
> create mode 100644 fs/netfs/write_collect.c
> create mode 100644 fs/netfs/write_issue.c
>
This all looks pretty reasonable. There is at least one bugfix that
looks like it ought to go in independently (#17). #19 is huge, complex
and hard to review. That will need some cycles in -next, I think. In any
case, on any that I didn't send comments you can add:
Reviewed-by: Jeff Layton
On Thu, 2024-03-28 at 16:34 +, David Howells wrote:
> Fix the error return in netfs_perform_write() acting in writethrough-mode
> to return any cached error in the case that netfs_end_writethrough()
> returns 0.
>
> Signed-off-by: David Howells
> cc: Jeff Layton
> cc:
On Thu, 2024-03-28 at 16:34 +, David Howells wrote:
> Remove the old writeback code.
>
> Signed-off-by: David Howells
> cc: Jeff Layton
> cc: Eric Van Hensbergen
> cc: Latchesar Ionkov
> cc: Dominique Martinet
> cc: Christian Schoenebeck
> cc: Marc Dionne
ric Van Hensbergen
> cc: Latchesar Ionkov
> cc: Dominique Martinet
> cc: Christian Schoenebeck
> cc: Jeff Layton
> cc: v...@lists.linux.dev
> cc: ne...@lists.linux.dev
> cc: linux-fsde...@vger.kernel.org
> ---
> fs/9p/vfs_addr.c | 2 --
> 1 file changed, 2 deletions(-)
d faulting
> through mmap all from adding pages for the duration.
>
> Signed-off-by: David Howells
> cc: Matthew Wilcox
> cc: Miklos Szeredi
> cc: Trond Myklebust
> cc: Christoph Hellwig
> cc: Andrew Morton
> cc: Alexander Viro
> cc: Christian Brauner
> cc: Jeff
get back new attrs from the server, but is that a problem? I'm
mainly curious as to what's paying attention to the i_blocks during this
window.
> Signed-off-by: David Howells
> cc: Steve French
> cc: Shyam Prasad N
> cc: Rohith Surabattula
> cc: Jeff Layton
> cc
cc: Steve French
> cc: Shyam Prasad N
> cc: Rohith Surabattula
> cc: Jeff Layton
> cc: linux-c...@vger.kernel.org
> cc: ne...@lists.linux.dev
> cc: linux-fsde...@vger.kernel.org
> ---
> fs/smb/client/fscache.c | 16 +++-
> fs/smb/client/inode.c | 2 ++
&
les_put_directory(cache->store);
> mntput(cache->mnt);
> + put_cred(cache->cache_cred);
>
> kfree(cache->rootdirname);
> kfree(cache->secctx);
Looks reasonable to me too. Nice catch:
Reviewed-by: Jeff Layton
153a9961b551 ("netfs: Implement unbuffered/DIO write support")
> Reported-by: Eric Van Hensbergen
> Link: https://lore.kernel.org/r/ZbQUU6QKmIftKsmo@FV7GG9FTHL/
> Signed-off-by: David Howells
> cc: Dominique Martinet
> cc: Jeff Layton
> cc: v...@lists.linux.d
op
> of the function.
>
> This can cause subsequent buffered read requests to block
> indefinitely, waiting for a non existing dio operation to complete.
>
> Add a inode_dio_end() for the NETFS_DIO_READ case, before returning.
>
> Signed-off-by: Marc Dionne
> Signed-off-by
| 2 +-
> fs/netfs/misc.c| 2 +-
> fs/smb/client/file.c | 10 +-
> include/trace/events/afs.h | 25 +
> 11 files changed, 83 insertions(+), 46 deletions(-)
>
These all look fine to me. You can add this to the set:
Reviewed-by: Jeff Layton
s automagically with:
>
> perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c
> perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c
> perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/netfs/*.c
&
+-
> 7 files changed, 26 insertions(+), 26 deletions(-)
>
Looks like a fairly straightforward cleanup. Aside from the changelog
comments on patch #1:
Reviewed-by: Jeff Layton
; folio_index(folio) <= unlocked)
> + if (have_unlocked && folio->index <= unlocked)
> continue;
> unlocked = folio_next_index(folio) - 1;
> trace_netfs_folio(folio, netfs_folio_trace_end_copy);
> diff --git a/fs/netfs/misc.c b/fs/netfs/misc.c
> index 0e3af37fc924..90051ced8e2a 100644
> --- a/fs/netfs/misc.c
> +++ b/fs/netfs/misc.c
> @@ -180,7 +180,7 @@ void netfs_invalidate_folio(struct folio *folio, size_t
> offset, size_t length)
> struct netfs_folio *finfo = NULL;
> size_t flen = folio_size(folio);
>
> - _enter("{%lx},%zx,%zx", folio_index(folio), offset, length);
> + _enter("{%lx},%zx,%zx", folio->index, offset, length);
>
> folio_wait_fscache(folio);
>
>
Patch seems fine otherwise:
Reviewed-by: Jeff Layton
-
> include/linux/fscache-cache.h | 3 +++
> include/linux/netfs.h | 1 +
> 9 files changed, 56 insertions(+), 30 deletions(-)
>
These all look fine to me. You can add:
Reviewed-by: Jeff Layton
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
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
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
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
re feeling
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: conv
.
FWIW, I'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
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 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 bytes
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 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 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
> >
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
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
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 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/
Convert to using the new inode timestamp accessor functions.
Signed-off-by: Jeff Layton
---
fs/erofs/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index edc8ec7581b8..b8ad05b4509d 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs
Signed-off-by: Jeff Layton
---
fs/erofs/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index edc8ec7581b8..b8ad05b4509d 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -175,7 +175,8 @@ static void *erofs_read_inode(struct
need some 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" patches before
you revert the infrastructure.
--
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 n
; @Jan, what do you think?
>
> > 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
#x27;t a big deal regressions like this were always to be expected 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 stab at doing this for a later kernel release.
This is very much a "back to the drawing board" idea. It may not pan out
after all, but if it does then we could consider removing the mount
option at that point.
--
Jeff Layton
request_mask, inode);
> > } else {
> > stat->mtime = inode->i_mtime;
> > 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_NODEVBIT(2) /* Disallow access to device special
> > files */
> > #define SB_NOEXEC BIT(3) /* Disallow program execution */
> > #define SB_SYNCHRONOUS BIT(4) /* Writes are synced at once */
> > +#define SB_MGTIME BIT(5) /* Use multi-grain timestamps */
> > #define SB_MANDLOCK BIT(6) /* Allow mandatory locks on an FS */
> > #define SB_DIRSYNC BIT(7) /* Directory modifications are
> > synchronous */
> > #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_MANDLOCK(inode) __IS_FLG(inode, SB_MANDLOCK)
> > #define IS_NOATIME(inode) __IS_FLG(inode, SB_RDONLY|SB_NOATIME)
> > +#define IS_MGTIME(inode) __IS_FLG(inode, SB_MGTIME)
> > #define IS_I_VERSION(inode)__IS_FLG(inode, SB_I_VERSION)
> >
> > #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
> > @@ -2366,7 +2368,7 @@ struct file_system_type {
> > */
> > static inline bool is_mgtime(const struct inode *inode)
> > {
> > - return inode->i_sb->s_type->fs_flags & FS_MGTIME;
> > + return inode->i_sb->s_flags & SB_MGTIME;
> > }
> >
> > extern struct dentry *mount_bdev(struct file_system_type *fs_type,
> > --
> > 2.34.1
> >
--
Jeff Layton
Directory modifications are
> synchronous */
> #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_MANDLOCK(inode) __IS_FLG(inode, SB_MANDLOCK)
> #define IS_NOATIME(inode)__IS_FLG(inode, SB_RDONLY|SB_NOATIME)
> +#define IS_MGTIME(inode) __IS_FLG(inode, SB_MGTIME)
> #define IS_I_VERSION(inode) __IS_FLG(inode, SB_I_VERSION)
>
>
> #define IS_NOQUOTA(inode)((inode)->i_flags & S_NOQUOTA)
> @@ -2366,7 +2368,7 @@ struct file_system_type {
> */
> static inline bool is_mgtime(const struct inode *inode)
> {
> - return inode->i_sb->s_type->fs_flags & FS_MGTIME;
> + return inode->i_sb->s_flags & SB_MGTIME;
> }
>
>
> extern struct dentry *mount_bdev(struct file_system_type *fs_type,
The mount option looks reasonable. Thanks for throwing together the
patch. Maybe in the future we can come up with a way to mitigate the
problems and do this unconditionally?
Reviewed-by: 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 could be an
>
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.
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
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 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
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
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 time
h that 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
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
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 that thi
ore, even though it now
fetches its own timestamps from 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
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
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
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
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:
. 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 +
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
rse-grained one.
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/
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
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/
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
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 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/
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 chang
some 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 +-
ed-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 +
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
be everything above 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 operat
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
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
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
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
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
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
. 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
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
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
rse-grained one.
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/
Add 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_in
to linux-next. Christian, would you 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
ntrol *sc)
> {
> - struct nfsd_net *nn = container_of(shrink,
> - struct nfsd_net, nfsd_reply_cache_shrinker);
> + struct nfsd_net *nn = shrink->private_data;
>
> return atomic_read(&nn->num_drc_entries);
> }
> @@ -342,8 +344,
+ shrinker_register(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_id);
>
> - unregister_shrinker(&nn->nfsd_client_shrinker);
> + shrinker_unregister(nn->nfsd_client_shrinker);
> cancel_work(&nn->nfsd_shrinker_work);
> cancel_delayed_work_sync(&nn->laundromat_work);
> locks_end_grace(&nn->nfsd4_manager);
Acked-by: 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
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
. 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
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
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
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
rse-grained one.
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/
oking for feedback on the
core 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 multigrai
Add 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_in
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
1 - 100 of 129 matches
Mail list logo