Re: [PATCH v6 9/9] tmpfs: add support for multigrain timestamps

2024-07-17 Thread Jan Kara
iewed-by: Josef Bacik > Signed-off-by: Jeff Layton Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > mm/shmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH v6 7/9] ext4: switch to multigrain timestamps

2024-07-17 Thread Jan Kara
gt; > Reviewed-by: Josef Bacik > Signed-off-by: Jeff Layton You, I don't think anything else is needed. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/super.c | 2 +- > 1 file changed, 1 inser

Re: [PATCH v6 5/9] Documentation: add a new file documenting multigrain timestamps

2024-07-17 Thread Jan Kara
fixed feel free to add: Reviewed-by: Jan Kara > +Implementation Notes > + > +Multigrain timestamps are intended for use by local filesystems that get > +ctime values from the local clock. This is in contrast to network filesystems > +and the like that just

Re: [PATCH v6 4/9] fs: have setattr_copy handle multigrain timestamps appropriately

2024-07-17 Thread Jan Kara
ant to do this universally however, as some > filesystems (e.g. most networked fs) want to do an explicit update > elsewhere before updating the local inode. > > Reviewed-by: Darrick J. Wong > Reviewed-by: Josef Bacik > Signed-off-by: Jeff Layton Looks good to me so feel free t

Re: [PATCH v6 3/9] fs: add percpu counters for significant multigrain timestamp events

2024-07-17 Thread Jan Kara
ps); > > > > Should this all get switched off if CONFIG_DEBUG_FS=n? > > > > --D > > > > Sure, why not. That's simple enough to do. > > I pushed an updated mgtime branch to my git tree. Here's the updated > patch that's the only difference: >

Re: [PATCH v6 2/9] fs: tracepoints around multigrain timestamp events

2024-07-17 Thread Jan Kara
On Mon 15-07-24 08:48:53, Jeff Layton wrote: > Add some tracepoints around various multigrain timestamp events. > > Reviewed-by: Josef Bacik > Signed-off-by: Jeff Layton Looks good to me. Feel free to add: Reviewed-

Re: [PATCH v6 1/9] fs: add infrastructure for multigrain timestamps

2024-07-17 Thread Jan Kara
eds or fails, since > either is just as valid. > > Filesystems can opt into this by setting the FS_MGTIME fstype flag. > Others should be unaffected (other than being subject to the same floor > value as multigrain filesystem

Re: [PATCH 01/10] fs: turn inode ctime fields into a single ktime_t

2024-07-02 Thread Jan Kara
with ctimes out of range makes sense. Or at least complain about it if nothing else (which has some precedens in the year 2038 problem). Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 0/7] fsdax,xfs: Add reflink&dedupe support for fsdax

2021-02-08 Thread Jan Kara
ap_util.c | 6 +- > fs/xfs/xfs_file.c | 30 ++- > fs/xfs/xfs_inode.c | 8 +- > fs/xfs/xfs_inode.h | 1 + > fs/xfs/xfs_iomap.c | 3 +- > fs/xfs/xfs_iops.c | 11 ++- > fs/xfs/xfs_reflink.c | 23 - > include/linux/dax.h | 5 ++ >

Re: [PATCH] fs: use READ_ONCE/WRITE_ONCE with the i_size helpers

2019-10-14 Thread Jan Kara
31 <+161>: 4c 0f 47 f0 cmova %rax,%r14 > > and this works out properly, we only read the value once and so we won't > trip over this problem again. > > Signed-off-by: Josef Bacik Yeah, given i_size_read() is specifically meant for unlocked access to i_size, it makes sense

Re: [PATCH 2/3] ext4: fix inode rwsem regression

2019-09-23 Thread Jan Kara
d/write methods to just do the > trylock for the RWF_NOWAIT case. > > Fixes: 728fbc0e10b7 ("ext4: nowait aio support") > Signed-off-by: Goldwyn Rodrigues Thanks for fixing this! The patch looks good to me. You can add: Reviewed-by: Jan Kara

Re: [RFC PATCH 1/3] fs: pass READ/WRITE to kiocb_set_rw_flags()

2019-09-20 Thread Jan Kara
e_iter(), > but we can move that into the common code. > > Cc: Jan Kara > Cc: Jens Axboe > Signed-off-by: Omar Sandoval ... > index ffe35d97afcb..75c4b7680385 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -3351,8 +3351,11 @@ static inline int iocb_f

Re: [Ocfs2-devel] [PATCH 2/7] vfs: flush and wait for io when setting the immutable flag via SETFLAGS

2019-06-25 Thread Jan Kara
On Mon 24-06-19 20:04:39, Darrick J. Wong wrote: > On Mon, Jun 24, 2019 at 02:58:17PM -0700, Darrick J. Wong wrote: > > On Mon, Jun 24, 2019 at 01:37:37PM +0200, Jan Kara wrote: > > > On Fri 21-06-19 16:57:07, Darrick J. Wong wrote: > > > > From: Darrick J. Wong >

Re: [PATCH 2/7] vfs: flush and wait for io when setting the immutable flag via SETFLAGS

2019-06-24 Thread Jan Kara
ng than what we need to do to set immutable flag. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 2/7] vfs: flush and wait for io when setting the immutable flag via SETFLAGS

2019-06-24 Thread Jan Kara
currently the right thing but seems like a landmine waiting to trip? So I'd just drop the vfs_ioc_setflags_need_flush() abstraction to make it clear what's going on. Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 1/7] mm/fs: don't allow writes to immutable files

2019-06-24 Thread Jan Kara
ary checks to make the write, mmap, and > truncate behavior consistent with what the manpage says and consistent > with other syscalls on filesystems which support IMMUTABLE. > > Signed-off-by: Darrick J. Wong Looks good to me. You can add: Reviewed-by: Jan Kara

Re: [PATCH 4/6] vfs: don't allow most setxattr to immutable files

2019-06-20 Thread Jan Kara
xtsize != fa->fsx_extsize) > + return -EPERM; > + if ((old_fa->fsx_xflags & FS_XFLAG_COWEXTSIZE) && > + old_fa->fsx_cowextsize != fa->fsx_cowextsize) > + return -EPERM; > + } > + > /* Extent size hints of zero turn off the flags. */ > if (fa->fsx_extsize == 0) > fa->fsx_xflags &= ~(FS_XFLAG_EXTSIZE | FS_XFLAG_EXTSZINHERIT); Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 2/6] vfs: flush and wait for io when setting the immutable flag via SETFLAGS

2019-06-20 Thread Jan Kara
urn inode_flush_data(inode); > + return 0; > +} > + But this is racy at least for page faults, isn't it? What protects you against write faults just after filemap_write_and_wait() has finished? So either you need to set FS_IMMUTABLE_FL before flushing data or you need to get more protection from the fs than just i_rwsem. In the case of ext4 that would be i_mmap_rwsem but other filesystems don't have equivalent protection... Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-30 Thread Jan Kara
On Thu 30-05-19 08:14:45, Dave Chinner wrote: > On Wed, May 29, 2019 at 03:46:29PM +0200, Jan Kara wrote: > > On Wed 29-05-19 14:46:58, Dave Chinner wrote: > > > iomap_apply() > > > > > > ->iomap_begin() > > > map old data extent that

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-29 Thread Jan Kara
58AM +0800, Shiyang Ruan wrote: > > > > > On 5/28/19 5:17 PM, Jan Kara wrote: > > > > > > I'm sorry but I don't follow what you suggest. One COW operation is > > > > > > a call > > > > > > to dax_iomap_rw(), isn't it?

Re: [PATCH 04/18] dax: Introduce IOMAP_DAX_COW to CoW edges during writes

2019-05-28 Thread Jan Kara
t may call iomap_apply() several times, each invocation calls ->iomap_begin(), ->actor() (dax_iomap_actor()), ->iomap_end() once. So I don't see a difference between doing something in ->actor() and ->iomap_end() (besides the passed arguments but that does not seem to be your concern). So what do you exactly want to do? Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 16/18] btrfs: Writeprotect mmap pages on snapshot

2019-05-23 Thread Jan Kara
On Thu 23-05-19 10:27:22, Goldwyn Rodrigues wrote: > On 16:04 23/05, Jan Kara wrote: > > On Mon 29-04-19 12:26:47, Goldwyn Rodrigues wrote: > > > From: Goldwyn Rodrigues > > > > > > Inorder to make sure mmap'd files don't change after snapshot, >

Re: [PATCH 16/18] btrfs: Writeprotect mmap pages on snapshot

2019-05-23 Thread Jan Kara
apping_range(mapping, > fs_info->fs_devices->latest_bdev, > wbc); > } > @@ -9981,6 +9990,8 @@ static void btrfs_run_delalloc_work(struct btrfs_work > *work) > delalloc_work = container_of(work, struct btrfs_delalloc_work, >work); > inode = delalloc_work->inode; > + if (IS_DAX(inode)) > + filemap_fdatawrite(inode->i_mapping); > filemap_flush(inode->i_mapping); > if (test_bit(BTRFS_INODE_HAS_ASYNC_EXTENT, > &BTRFS_I(inode)->runtime_flags)) > -- > 2.16.4 > -- Jan Kara SUSE Labs, CR

Re: [PATCH 12/18] btrfs: allow MAP_SYNC mmap

2019-05-23 Thread Jan Kara
IG_FS_DAX > + .mmap_supported_flags = MAP_SYNC, > +#endif > .open = btrfs_file_open, > .release= btrfs_release_file, > .fsync = btrfs_sync_file, > -- > 2.16.4 > -- Jan Kara SUSE Labs, CR

Re: [PATCH 10/18] dax: replace mmap entry in case of CoW

2019-05-23 Thread Jan Kara
+ (xas->xa_index & PG_PMD_COLOUR) == dax_to_pfn(new_entry))) { /* New entry is a subset of the current one? Skip update... */ xas_load(xas); } else { do work... } Honza -- Jan Kara SUSE Labs, CR

Re: [PATCH 08/18] dax: memcpy page in case of IOMAP_DAX_COW for mmap faults

2019-05-23 Thread Jan Kara
t; because the actor returns vm_fault_t, not bytes copied. I guess that > makes it a tiny bit more complicated to pass in two (struct iomap *) to > the iomap_begin function... Hum, right. We could actually reimplement dax_iomap_{pte|pmd}_fault() using iomap_apply(). We would just need to propagate error code out of our 'actor' inside the structure pointed to by 'data'. But that's doable. Honza -- Jan Kara SUSE Labs, CR

Re: Btrfs and fanotify filesystem watches

2018-11-27 Thread Jan Kara
be able to properly decode > file handles and resolve correct paths. > > The bottom line is that btrfs will have the full functionality of super block > monitoring with no ability to watch (or ignore) a single subvolume > (unless by using a mount mark). Sounds good. I'll check the new version of your series. Honza -- Jan Kara SUSE Labs, CR

Btrfs and fanotify filesystem watches

2018-11-23 Thread Jan Kara
Changed subject to better match what we discuss and added btrfs list to CC. On Thu 22-11-18 17:18:25, Amir Goldstein wrote: > On Thu, Nov 22, 2018 at 3:26 PM Jan Kara wrote: > > > > On Thu 22-11-18 14:36:35, Amir Goldstein wrote: > > > > > Regardless, IIUC, btrfs_

Re: [RFC][PATCH v4 09/09] btrfs: use common file type conversion

2018-11-22 Thread Jan Kara
implemented in fs_types.c > > Acked-by: David Sterba > Signed-off-by: Amir Goldstein > Signed-off-by: Phillip Potter The patch looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/btrfs/btrfs_inode.

Re: [PATCH 7/7] btrfs: drop mmap_sem in mkwrite for btrfs

2018-10-26 Thread Jan Kara
On Thu 25-10-18 09:58:51, Josef Bacik wrote: > On Thu, Oct 25, 2018 at 03:22:30PM +0200, Jan Kara wrote: > > On Thu 18-10-18 16:23:18, Josef Bacik wrote: > > > ->page_mkwrite is extremely expensive in btrfs. We have to reserve > > > space, which can take 6 lifetimes,

Re: [PATCH 7/7] btrfs: drop mmap_sem in mkwrite for btrfs

2018-10-25 Thread Jan Kara
ed to your filesystem metadata. So why cannot you infer from that metadata (extent tree, whatever - I'd use extent status tree in ext4) whether that particular file+offset is already prepared for writing and just bail out with success in that case? Honza -- Jan Kara SUSE Labs, CR

Re: [RFC v2 3/4] ext4: add verifier check for symlink with append/immutable flags

2018-05-11 Thread Jan Kara
ooks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/inode.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index 37a2f7a2b66a..6acf0dd6b6

Re: [PATCH v5 02/19] fs: don't take the i_lock in inode_inc_iversion

2018-01-09 Thread Jan Kara
h for an intermediate version. You can add: Reviewed-by: Jan Kara Honza > --- > include/linux/iversion.h | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/include/linux/iversion.h b/inc

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2018-01-04 Thread Jan Kara
On Thu 04-01-18 12:32:07, Dave Chinner wrote: > On Wed, Jan 03, 2018 at 02:59:21PM +0100, Jan Kara wrote: > > On Wed 03-01-18 13:32:19, Dave Chinner wrote: > > > I think we could probably block ->write_metadata if necessary via a > > > completion/wakeup style notif

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2018-01-03 Thread Jan Kara
On Wed 03-01-18 10:49:33, Josef Bacik wrote: > On Wed, Jan 03, 2018 at 02:59:21PM +0100, Jan Kara wrote: > > On Wed 03-01-18 13:32:19, Dave Chinner wrote: > > > On Tue, Jan 02, 2018 at 11:13:06AM -0500, Josef Bacik wrote: > > > > On Wed, Dec 20, 2017 at 03

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2018-01-03 Thread Jan Kara
On Wed 03-01-18 13:32:19, Dave Chinner wrote: > On Tue, Jan 02, 2018 at 11:13:06AM -0500, Josef Bacik wrote: > > On Wed, Dec 20, 2017 at 03:30:55PM +0100, Jan Kara wrote: > > > On Wed 20-12-17 08:35:05, Dave Chinner wrote: > > > > On Tue, Dec 19, 2017 at 01

Re: [PATCH v4 01/19] fs: new API for handling inode->i_version

2018-01-02 Thread Jan Kara
t; > > > Observers see i_version as a 64 number which never decreases. > > > > and the rest still makes perfect sense. > > > > Thanks! Fixed in my tree. I'll not resend the set just for that though. With this fixed the patch looks good to me. You can ad

Re: [PATCH v4 19/19] fs: handle inode->i_version more efficiently

2018-01-02 Thread Jan Kara
;old" value and try again. > > This method allows us to avoid incrementing the counter on writes (and > dirtying the metadata) under typical workloads. We only need to increment > if it has been queried since it was last changed. > > Signed-off-by: Jeff Layton Looks

Re: [PATCH v4 16/19] fs: only set S_VERSION when updating times if necessary

2018-01-02 Thread Jan Kara
IME | S_MTIME)) && > + !(inode->i_sb->s_flags & SB_LAZYTIME)) > + dirty = true; When you pass 'dirty' to inode_maybe_inc_iversion(), it is always false. Maybe this condition should be at the beginning of the function? Once you fix that the patch

Re: [PATCH v3 19/19] fs: handle inode->i_version more efficiently

2017-12-21 Thread Jan Kara
er in the > + * cmpxchg below) pairs with the barrier in > + * inode_maybe_inc_iversion(). > + */ > + smp_mb(); > break; > + } > > new = cur | I_VERS

Re: [PATCH v3 19/19] fs: handle inode->i_version more efficiently

2017-12-20 Thread Jan Kara
version would be: Update: modify inode inode_maybe_inc_iversion(inode) Read: my_version = inode_query_iversion(inode) get inode data And you need to make sure 'get inode data' does not get speculatively evaluated before you actually sample i_version so that you are guaranteed that

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2017-12-20 Thread Jan Kara
On Wed 20-12-17 08:35:05, Dave Chinner wrote: > On Tue, Dec 19, 2017 at 01:07:09PM +0100, Jan Kara wrote: > > On Wed 13-12-17 09:20:04, Dave Chinner wrote: > > > On Tue, Dec 12, 2017 at 01:05:35PM -0500, Josef Bacik wrote: > > > > On Tue, Dec 12, 2017 at 10:36:

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2017-12-19 Thread Jan Kara
ntinue; > + if (!trylock_super(sb)) > + continue; > + spin_unlock(&wb->bdi->sb_list_lock); > + wrote += writeback_sb_metadata(sb, wb, work); > + spin_lock(&wb->b

Re: [PATCH v3 06/10] writeback: introduce super_operations->write_metadata

2017-12-19 Thread Jan Kara
> > > > we can > > > > find any dirty sb's on the bdi we are currently doing writeback on and > > > > call into > > > > their ->write_metadata callback. > > > > > > > > Signed-off-by: Josef Bacik > > > > R

Re: [PATCH v3 19/19] fs: handle inode->i_version more efficiently

2017-12-19 Thread Jan Kara
On Mon 18-12-17 12:22:20, Jeff Layton wrote: > On Mon, 2017-12-18 at 17:34 +0100, Jan Kara wrote: > > On Mon 18-12-17 10:11:56, Jeff Layton wrote: > > > static inline bool > > > inode_maybe_inc_iversion(struct inode *inode, bool force) > > > { > >

Re: [PATCH v3 05/10] writeback: add counters for metadata usage

2017-12-18 Thread Jan Kara
PCP counters for metadata (I don't think they are that critical for performance for metadata tracking) and add to the comment I've suggested above: "Also note that updates to these counters won't be batched using per-cpu counters since the updates are generally larger than the c

Re: [PATCH v3 03/10] lib: add a __fprop_add_percpu_max

2017-12-18 Thread Jan Kara
On Mon 11-12-17 16:55:28, Josef Bacik wrote: > From: Josef Bacik > > This helper allows us to add an arbitrary amount to the fprop > structures. > > Signed-off-by: Josef Bacik Looks good. You can add: Rev

Re: [PATCH v3 19/19] fs: handle inode->i_version more efficiently

2017-12-18 Thread Jan Kara
_VERSION_QUERIED; > + old = atomic64_cmpxchg(&inode->i_version, cur, new); > + if (old == cur) > + break; > + cur = old; > + } Why not just use atomic64_or() here?

Re: [PATCH v3 16/19] fs: only set S_VERSION when updating times if necessary

2017-12-18 Thread Jan Kara
t; + if (dirty) > iflags |= I_DIRTY_SYNC; > __mark_inode_dirty(inode, iflags); > return 0; > @@ -1863,7 +1871,7 @@ int file_update_time(struct file *file) > if (!timespec_equal(&inode->i_ctime, &now)) > sync_it |= S_CTIME; >

Re: [PATCH] mm: save/restore current->journal_info in handle_mm_fault

2017-12-15 Thread Jan Kara
On Fri 15-12-17 09:17:42, Yan, Zheng wrote: > On Fri, Dec 15, 2017 at 12:53 AM, Jan Kara wrote: > >> > > >> > In this particular case I'm not sure why does ceph pass 'filp' into > >> > readpage() / readpages() handler when it already

Re: [PATCH] mm: save/restore current->journal_info in handle_mm_fault

2017-12-14 Thread Jan Kara
On Thu 14-12-17 22:30:26, Yan, Zheng wrote: > On Thu, Dec 14, 2017 at 9:43 PM, Jan Kara wrote: > > On Thu 14-12-17 18:55:27, Yan, Zheng wrote: > >> We recently got an Oops report: > >> > >> BUG: unable to handle kernel NULL pointer dereference at (null) >

Re: [PATCH] mm: save/restore current->journal_info in handle_mm_fault

2017-12-14 Thread Jan Kara
to read/set > + * current->journal_info. > + */ > + old_journal_info = current->journal_info; > + current->journal_info = NULL; > + > if (unlikely(is_vm_hugetlb_page(vma))) > ret = hugetlb_fault(vma->vm_mm, vma, address, flags);

Re: [PATCH] fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at

2017-12-13 Thread Jan Kara
orowski Looks good to me. You can add: Acked-by: Jan Kara Honza > --- > Sending this as one piece; if you guys would instead prefer this chopped > into tiny per-filesystem bits, please say so. > > > D

Re: [PATCH v2 06/11] writeback: add counters for metadata usage

2017-12-04 Thread Jan Kara
node_page_state(pgdat, NR_METADATA_WRITEBACK_BYTES); > + unreclaimable >>= PAGE_SHIFT; > + nr_metadata_reclaimable -= unreclaimable; > + } > + return nr_metadata_reclaimable + nr_pagecache_reclaimable - delta; > } Ditto as with __vm

Re: [PATCHSET v2] cgroup, writeback, btrfs: make sure btrfs issues metadata IOs from the root cgroup

2017-12-01 Thread Jan Kara
On Wed 29-11-17 13:38:26, Chris Mason wrote: > On 11/29/2017 12:05 PM, Tejun Heo wrote: > >On Wed, Nov 29, 2017 at 09:03:30AM -0800, Tejun Heo wrote: > >>Hello, > >> > >>On Wed, Nov 29, 2017 at 05:56:08PM +0100, Jan Kara wrote: > >>>What has happene

Re: [PATCH v2 05/11] writeback: convert the flexible prop stuff to bytes

2017-11-29 Thread Jan Kara
; > Signed-off-by: Josef Bacik Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > mm/page-writeback.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/mm/pa

Re: [PATCH v2 03/11] lib: make the fprop batch size a multiple of PAGE_SIZE

2017-11-29 Thread Jan Kara
init_percpu(struct fprop_local_percpu *pl, gfp_t gfp) > { > -- > 2.7.5 > -- Jan Kara SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 04/11] lib: add a __fprop_add_percpu_max

2017-11-29 Thread Jan Kara
On Wed 22-11-17 16:15:59, Josef Bacik wrote: > From: Josef Bacik > > This helper allows us to add an arbitrary amount to the fprop > structures. > > Signed-off-by: Josef Bacik Looks good to me. You can add: Rev

Re: [PATCH v2 02/11] writeback: convert WB_WRITTEN/WB_DIRITED counters to bytes

2017-11-29 Thread Jan Kara
hem to count bytes written/dirtied, and allow the > metadata accounting stuff to change the counters as well. > > Signed-off-by: Josef Bacik > Acked-by: Tejun Heo Looks good to me. You can add: Reviewed-by: Jan Kara

Re: [PATCHSET v2] cgroup, writeback, btrfs: make sure btrfs issues metadata IOs from the root cgroup

2017-11-29 Thread Jan Kara
> fs/ext2/inode.c |3 ++- > fs/ext2/super.c |1 - > fs/ext4/inode.c |5 - > fs/ext4/super.c |2 -- > include/linux/backing-dev.h |2 +- > include/linux/buffer_head.h |3 ++

Re: [PATCH 06/10] writeback: add counters for metadata usage

2017-11-22 Thread Jan Kara
nr_metadata_reclaimable -= unreclaimable; > + } > + return nr_metadata_reclaimable + nr_pagecache_reclaimable - delta; > } So I've checked both places that use this function and I think they are fine with the change. However it would still be good to get someone more knowledgeable of reclaim paths to have a look at this patch. Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 03/10] lib: add a batch size to fprop_global

2017-11-22 Thread Jan Kara
On Wed 22-11-17 09:47:16, Jan Kara wrote: > On Tue 14-11-17 16:56:49, Josef Bacik wrote: > > From: Josef Bacik > > > > The flexible proportion stuff has been used to track how many pages we > > are writing out over a period of time, so counts everything in single >

Re: [PATCH 03/10] lib: add a batch size to fprop_global

2017-11-22 Thread Jan Kara
gt; percpu_counter_add(&p->events, 1); > } > > @@ -267,6 +266,6 @@ void __fprop_inc_percpu_max(struct fprop_global *p, > return; > } else > fprop_reflect_period_percpu(p, pl); > - percpu_counter_add_batch(&pl->events, 1, PROP_BATCH); > + percpu_counter_add_batch(&pl->events, 1, p->batch_size); > percpu_counter_add(&p->events, 1); > } > -- > 2.7.5 > -- Jan Kara SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 4/5] cgroup, buffer_head: implement submit_bh_blkcg_css()

2017-10-11 Thread Jan Kara
On Tue 10-10-17 08:54:40, Tejun Heo wrote: > Implement submit_bh_blkcg_css() which will be used to override cgroup > membership on specific buffer_heads. > > v2: Reimplemented using create_bh_bio() as suggested by Jan. > > Signed-off-by: Tejun Heo > Cc: Jan Kara > Cc:

Re: [PATCH 3/5] buffer_head: separate out create_bh_bio() from submit_bh_wbc()

2017-10-11 Thread Jan Kara
As bio can now be manipulated before submitted, we can move out @wbc > handling into submit_bh_wbc() and similarly this will make adding more > submit_bh variants straight-forward. > > This patch is pure refactoring and doesn't cause any functional > changes. > > Signed

Re: [PATCH 1/5] blkcg: export blkcg_root_css

2017-10-11 Thread Jan Kara
On Tue 10-10-17 08:54:37, Tejun Heo wrote: > Export blkcg_root_css so that filesystem modules can use it. > > Signed-off-by: Tejun Heo Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > block/blk-cgro

Re: [PATCH 2/3] cgroup, writeback: implement submit_bh_blkcg_css()

2017-10-10 Thread Jan Kara
ut() to kick off >* regular writeback instead of writing things out itself. >*/ > - if (wbc->wb) > - bio_associate_blkcg(bio, wbc->wb->blkcg_css); > + if (wbc->blkcg_css) > + bio_associate_blkcg(bio, wbc->blkcg_css); > } > > #else/* CONFIG_CGROUP_WRITEBACK */ > -- > 2.9.5 > -- Jan Kara SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/3] cgroup, writeback: replace SB_I_CGROUPWB with per-inode S_CGROUPWB

2017-10-10 Thread Jan Kara
> > * btrfs sets the new flag in btrfs_update_iflags() function. Note > that this automatically excludes btree_inode which doesn't use > btrfs_update_iflags() during initialization. This is an intended > behavior change. > > Signed-off-by: Tejun Heo > Cc: Jan Kara

[PATCH 02/16] btrfs: Use pagevec_lookup_range_tag()

2017-10-09 Thread Jan Kara
Signed-off-by: Jan Kara --- fs/btrfs/extent_io.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 970190cd347e..a4eb6c988f27 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3818,8 +3818,8 @@ int

[PATCH 02/15] btrfs: Use pagevec_lookup_range_tag()

2017-09-27 Thread Jan Kara
We want only pages from given range in btree_write_cache_pages() and extent_write_cache_pages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: linux-btrfs@vger.kernel.org CC: David Sterba Reviewed-by: David Sterba Signed-off-by: Jan Kara

[PATCH 02/15] btrfs: Use pagevec_lookup_range_tag()

2017-09-14 Thread Jan Kara
We want only pages from given range in btree_write_cache_pages() and extent_write_cache_pages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: linux-btrfs@vger.kernel.org CC: David Sterba Signed-off-by: Jan Kara --- fs/btrfs/extent_io.c | 19

[PATCH 0/11 v1] Fix inheritance of SGID in presence of default ACLs

2017-06-22 Thread Jan Kara
Hello, this patch set fixes a problem introduced by commit 073931017b49 "posix_acl: Clear SGID bit when setting file permissions". The problem is that when new directory 'DIR1' is created in a directory 'DIR0' with SGID bit set, DIR1 is expected to have SGID bit set (and owning group equal to the

[PATCH 03/11] btrfs: Don't clear SGID when inheriting ACLs

2017-06-22 Thread Jan Kara
it prevents SGID bit clearing and the mode has been properly set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: sta...@vger.kernel.org CC: linux-btrfs@vger.kernel.org CC: David Sterba Signed-off-by: Jan Kara --- fs/btrfs/acl.c | 13 +++-- 1 file cha

Re: [PATCH v7 01/22] fs: remove call_fsync helper function

2017-06-20 Thread Jan Kara
On Fri 16-06-17 15:34:06, Jeff Layton wrote: > Requested-by: Christoph Hellwig > Signed-off-by: Jeff Layton Looks good. You can add: Reviewed-by: Jan Kara Honza > --- > fs/sync.c | 2 +- > inc

Re: [PATCH v7 05/22] jbd2: don't clear and reset errors after waiting on writeback

2017-06-20 Thread Jan Kara
27;t attempt to > re-set the error flag if it fails. > > Signed-off-by: Jeff Layton Looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/jbd2/commit.c | 15 +++ > include/linux/f

Re: [PATCH 01/35] fscache: Remove unused ->now_uncached callback

2017-06-19 Thread Jan Kara
On Thu 01-06-17 13:34:34, Jan Kara wrote: > On Thu 01-06-17 11:26:08, David Howells wrote: > > Jan Kara wrote: > > > > > The callback doesn't ever get called. Remove it. > > > > Hmmm... I should perhaps be calling this. I'm not sure why I never di

Re: [Cluster-devel] [PATCH 00/35 v1] pagevec API cleanups

2017-06-01 Thread Jan Kara
On Thu 01-06-17 04:36:04, Christoph Hellwig wrote: > On Thu, Jun 01, 2017 at 11:32:10AM +0200, Jan Kara wrote: > > * Implement ranged variants for pagevec_lookup and find_get_ functions. Lot > > of callers actually want a ranged lookup and we unnecessarily opencode > > this

Re: [PATCH 01/35] fscache: Remove unused ->now_uncached callback

2017-06-01 Thread Jan Kara
On Thu 01-06-17 11:26:08, David Howells wrote: > Jan Kara wrote: > > > The callback doesn't ever get called. Remove it. > > Hmmm... I should perhaps be calling this. I'm not sure why I never did. > > At the moment, it doesn't strictly matter as op

[PATCH 11/35] hugetlbfs: Use pagevec_lookup_range() in remove_inode_hugepages()

2017-06-01 Thread Jan Kara
We want only pages from given range in remove_inode_hugepages(). Use pagevec_lookup_range() instead of pagevec_lookup(). CC: Nadia Yvette Chambers Signed-off-by: Jan Kara --- fs/hugetlbfs/inode.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/fs

[PATCH 05/35] mm: Fix THP handling in invalidate_mapping_pages()

2017-06-01 Thread Jan Kara
rly unlock the page. Also update the comment before the condition to explain why we decide not to invalidate the page as it was not clear to me and I had to ask Kirill. Signed-off-by: Jan Kara --- mm/truncate.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mm/truncate.c

[PATCH 01/35] fscache: Remove unused ->now_uncached callback

2017-06-01 Thread Jan Kara
The callback doesn't ever get called. Remove it. Signed-off-by: Jan Kara --- Documentation/filesystems/caching/netfs-api.txt | 2 -- fs/9p/cache.c | 29 - fs/afs/cache.c | 43 - fs

[PATCH 03/35] ext4: Fix off-by-in in loop termination in ext4_find_unwritten_pgoff()

2017-06-01 Thread Jan Kara
There is an off-by-one error in loop termination conditions in ext4_find_unwritten_pgoff() since 'end' may index a page beyond end of desired range if 'endoff' is page aligned. It doesn't have any visible effects but still it is good to fix it. Signed-off-by: Jan Kara

[PATCH 10/35] ext4: Use pagevec_lookup_range() in writeback code

2017-06-01 Thread Jan Kara
Both occurences of pagevec_lookup() actually want only pages from a given range. Use pagevec_lookup_range() for the lookup. CC: "Theodore Ts'o" CC: linux-e...@vger.kernel.org Signed-off-by: Jan Kara --- fs/ext4/inode.c | 12 +--- 1 file changed, 5 insertions(+), 7 del

[PATCH 06/35] mm: Make pagevec_lookup() update index

2017-06-01 Thread Jan Kara
Make pagevec_lookup() (and underlying find_get_pages()) update index to the next page where iteration should continue. Most callers want this and also pagevec_lookup_tag() already does this. Signed-off-by: Jan Kara --- fs/buffer.c | 6 ++ fs/ext4/file.c | 4 +--- fs

[PATCH 09/35] ext4: Use pagevec_lookup_range() in ext4_find_unwritten_pgoff()

2017-06-01 Thread Jan Kara
Use pagevec_lookup_range() in ext4_find_unwritten_pgoff() since we are interested only in pages in the given range. Simplify the logic as a result of not getting pages out of range and index getting automatically advanced. CC: linux-e...@vger.kernel.org CC: "Theodore Ts'o" Sig

[PATCH 08/35] fs: Fix performance regression in clean_bdev_aliases()

2017-06-01 Thread Jan Kara
eration. Fixes: e64855c6cfaa0a80c1b71c5f647cb792dc436668 Signed-off-by: Jan Kara --- fs/buffer.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index fe0ee01c5a44..d63b22e50f38 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1632,19 +1632,18 @@ void clean_bdev

[PATCH 12/35] xfs: Use pagevec_lookup_range() in xfs_find_get_desired_pgoff()

2017-06-01 Thread Jan Kara
CC: linux-...@vger.kernel.org Signed-off-by: Jan Kara --- fs/xfs/xfs_file.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 487342078fc7..f9343dac7ff9 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c

[PATCH 02/35] ext4: Fix SEEK_HOLE

2017-06-01 Thread Jan Kara
y detect non-contiguous page indices and also handle all cases where we got less pages then expected in one place and handle it properly there. CC: sta...@vger.kernel.org Fixes: c8c0df241cc2719b1262e627f999638411934f60 CC: Zheng Liu Signed-off-by: Jan Kara --- fs/ext4/file.c | 50 +

[PATCH 13/35] mm: Remove nr_pages argument from pagevec_lookup{,_range}()

2017-06-01 Thread Jan Kara
All users of pagevec_lookup() and pagevec_lookup_range() now pass PAGEVEC_SIZE as a desired number of pages. Just drop the argument. Signed-off-by: Jan Kara --- fs/buffer.c | 3 +-- fs/ext4/file.c | 2 +- fs/ext4/inode.c | 5 ++--- fs/fscache/page.c | 2 +- fs

[PATCH 14/35] mm: Implement find_get_pages_range_tag()

2017-06-01 Thread Jan Kara
: Jan Kara --- include/linux/pagemap.h | 12 ++-- include/linux/pagevec.h | 11 +-- mm/filemap.c| 33 - mm/swap.c | 9 + 4 files changed, 48 insertions(+), 17 deletions(-) diff --git a/include/linux/pagemap.h b/include

[PATCH 07/35] mm: Implement find_get_pages_range()

2017-06-01 Thread Jan Kara
currently open-coding this. Also create corresponding pagevec_lookup_range() function. Signed-off-by: Jan Kara --- include/linux/pagemap.h | 12 ++-- include/linux/pagevec.h | 13 +++-- mm/filemap.c| 42 ++ mm/swap.c

[PATCH 16/35] ceph: Use pagevec_lookup_range_tag()

2017-06-01 Thread Jan Kara
We want only pages from given range in ceph_writepages_start(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: Ilya Dryomov CC: "Yan, Zheng" CC: ceph-de...@vger.kernel.org Signed-off-by: Jan Kara --- fs/ceph/addr.c | 19

[PATCH 23/35] mm: Use pagevec_lookup_range_tag() in __filemap_fdatawait_range()

2017-06-01 Thread Jan Kara
Use pagevec_lookup_range_tag() in __filemap_fdatawait_range() as it is interested only in pages from given range. Remove unnecessary code resulting from this. Signed-off-by: Jan Kara --- mm/filemap.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mm/filemap.c b/mm

[PATCH 15/35] btrfs: Use pagevec_lookup_range_tag()

2017-06-01 Thread Jan Kara
We want only pages from given range in btree_write_cache_pages() and extent_write_cache_pages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: linux-btrfs@vger.kernel.org CC: David Sterba Signed-off-by: Jan Kara --- fs/btrfs/extent_io.c | 19

[PATCH 00/35 v1] pagevec API cleanups

2017-06-01 Thread Jan Kara
Hello, This series cleans up pagevec API. The original motivation for the series is the patch "fs: Fix performance regression in clean_bdev_aliases()" however it has somewhat grown beyond that... The series is pretty large but most of the patches are trivial in nature. What the series does is: *

[PATCH 22/35] nilfs2: Use pagevec_lookup_range_tag()

2017-06-01 Thread Jan Kara
We want only pages from given range in nilfs_lookup_dirty_data_buffers(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: Ryusuke Konishi CC: linux-ni...@vger.kernel.org Signed-off-by: Jan Kara --- fs/nilfs2/segment.c | 8 ++-- 1 file changed

[PATCH 18/35] f2fs: Use pagevec_lookup_range_tag()

2017-06-01 Thread Jan Kara
We want only pages from given range in f2fs_write_cache_pages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: Jaegeuk Kim CC: linux-f2fs-de...@lists.sourceforge.net Signed-off-by: Jan Kara --- fs/f2fs/data.c | 9 ++--- 1 file changed, 2

[PATCH 25/35] mm: Remove nr_pages argument from pagevec_lookup_{,range}_tag()

2017-06-01 Thread Jan Kara
All users of pagevec_lookup() and pagevec_lookup_range() now pass PAGEVEC_SIZE as a desired number of pages. Just drop the argument. Signed-off-by: Jan Kara --- fs/btrfs/extent_io.c| 6 +++--- fs/ceph/addr.c | 3 +-- fs/ext4/inode.c | 2 +- fs/f2fs/checkpoint.c| 2

[PATCH 33/35] mm: Remove nr_entries argument from pagevec_lookup_entries{,_range}()

2017-06-01 Thread Jan Kara
All users pass PAGEVEC_SIZE as the number of entries now. Remove the argument. Signed-off-by: Jan Kara --- include/linux/pagevec.h | 7 +++ mm/shmem.c | 4 ++-- mm/swap.c | 6 ++ mm/truncate.c | 8 4 files changed, 11 insertions(+), 14

[PATCH 26/35] afs: Use find_get_pages_range_tag()

2017-06-01 Thread Jan Kara
Use find_get_pages_range_tag() in afs_writepages_region() as we are interested only in pages from given range. Remove unnecessary code after this conversion. CC: David Howells CC: linux-...@lists.infradead.org Signed-off-by: Jan Kara --- fs/afs/write.c | 11 ++- 1 file changed, 2

  1   2   3   >