Re: Btrfs and fanotify filesystem watches

2018-11-27 Thread Jan Kara
ble 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: [RFC v2 3/4] ext4: add verifier check for symlink with append/immutable flags

2018-05-11 Thread Jan Kara
;mcg...@kernel.org> Looks good to me. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > fs/ext4/inode.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/ext4/inod

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

2018-01-09 Thread Jan Kara
s changes the memory barrier behavior but IMO it is good enough for an intermediate version. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > include/linux/iversion.h | 7 --- > 1 file changed, 4 insertions

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 no

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
; > > 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 add: Reviewe

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

2018-01-02 Thread Jan Kara
quot; 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. > > S

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

2018-01-02 Thread Jan Kara
> + if ((flags & (S_ATIME | S_CTIME | 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 functi

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

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

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

2017-12-20 Thread Jan Kara
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 if data changes, you will observe larger i_version in the future. Also please add a comm

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
ue; > + spin_unlock(>bdi->sb_list_lock); > + wrote += writeback_sb_metadata(sb, wb, work); > + spin_lock(>bdi->sb_list_lock); > + up_read(>s_umount); > + } > +

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

2017-12-19 Thread Jan Kara
di for dirty super blocks to be added. From there > > > > 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 <

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
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 counter

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 <jba...@fb.com> > > This helper allows us to add an arbitrary amount to the fprop > structures. > > Signed-off-by: Josef Bacik <jba...@fb.com> Looks good. You can add: Revie

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

2017-12-18 Thread Jan Kara
pxchg(>i_version, cur, new); > + if (old == cur) > + break; > + cur = old; > + } Why not just use atomic64_or() here? Honza -- Jan Kara <j...@suse.com> SUS

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

2017-12-18 Thread Jan Kara
gs & SB_LAZYTIME) || (flags & S_VERSION)) > + 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(>i_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 <j...@suse.cz> wrote: > >> > > >> > In this particular case I'm not sure why does ceph pass 'filp' into > >> > readpage() / readpages() handler when

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 <j...@suse.cz> 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 derefere

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

2017-12-14 Thread Jan Kara
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
Borowski <kilob...@angband.pl> Looks good to me. You can add: Acked-by: Jan Kara <j...@suse.cz> Honza > --- > Sending this as one piece; if you guys would instead prefer this chopped > into tin

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

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

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
ad of number of pages. > > Signed-off-by: Josef Bacik <jba...@fb.com> Looks good to me. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > mm/page-writeback.c | 10 +- > 1 file changed, 5 in

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

2017-11-29 Thread Jan Kara
ids))) > > int fprop_local_init_percpu(struct fprop_local_percpu *pl, gfp_t gfp) > { > -- > 2.7.5 > -- Jan Kara <j...@suse.com> 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 <jba...@fb.com> > > This helper allows us to add an arbitrary amount to the fprop > structures. > > Signed-off-by: Josef Bacik <jba...@fb.com> Looks good to me. You can add: Revie

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

2017-11-29 Thread Jan Kara
m, so convert them to count bytes written/dirtied, and allow the > metadata accounting stuff to change the counters as well. > > Signed-off-by: Josef Bacik <jba...@fb.com> > Acked-by: Tejun Heo <t...@kernel.org> Looks good to me

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 |

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 knowledgea

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 <jba...@fb.com> > > > > The flexible proportion stuff has been used to track how many pages we > > are writing out over a period of time, so counts ev

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

2017-11-22 Thread Jan Kara
percpu_counter_add(>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(>events, 1, PROP_BATCH); > + percpu_counter_add_batch(>events, 1, p->batch_size); > percpu_counter_add(>events, 1); > } > -- > 2.7.5 > -- Jan Kara <j...@suse.com> 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 <t...@kernel.org> >

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

2017-10-11 Thread Jan Kara
gned-off-by: Tejun Heo <t...@kernel.org> > Suggested-by: Jan Kara <j...@suse.cz> Looks good to me. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > fs/buffer.c | 30 ++ &

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 <t...@kernel.org> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz>

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

2017-10-10 Thread Jan Kara
f-by: Tejun Heo <t...@kernel.org> > Cc: Jan Kara <j...@suse.cz> > Cc: Jens Axboe <ax...@kernel.dk> Hum, I dislike growing wbc just to pass blkcg_css through one function in fs/buffer.c (in otherwise empty wbc). Not that space would be a big concern for wbc but it just gets messier... C

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

2017-10-10 Thread Jan Kara
n. > > * 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 <t...@kerne

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

2017-10-09 Thread Jan Kara
<dste...@suse.com> Reviewed-by: Daniel Jordan <daniel.m.jor...@oracle.com> Signed-off-by: Jan Kara <j...@suse.cz> --- 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 970190cd3

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

2017-09-27 Thread Jan Kara
<dste...@suse.com> Signed-off-by: Jan Kara <j...@suse.cz> --- 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 0f077c5db58e..9b7936ea3a88 100644 --- a/fs/btrfs/extent_io.c +++ b/fs

[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 <dste...@suse.com> Signed-off-by: Jan Kara <j..

[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
set by posix_acl_create() anyway. Fixes: 073931017b49d9458aa351605b43a7e34598caef CC: sta...@vger.kernel.org CC: linux-btrfs@vger.kernel.org CC: David Sterba <dste...@suse.com> Signed-off-by: Jan Kara <j...@suse.cz> --- fs/btrfs/acl.c | 13 +++-- 1 file changed, 7 inse

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 <h...@infradead.org> > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz>

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

2017-06-20 Thread Jan Kara
attempt to > re-set the error flag if it fails. > > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks good to me. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > fs/jbd2/commit.c

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 <j...@suse.cz> wrote: > > > > > The callback doesn't ever get called. Remove it. > > > > Hmmm... I should perhaps be calling this. I'm not su

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 <j...@suse.cz> 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

[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 <n...@holomorphy.com> Signed-off-by: Jan Kara <j...@suse.cz> --- fs/hugetlbfs/inode.c | 18 ++ 1 file changed, 2 inser

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

2017-06-01 Thread Jan Kara
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 <j...@suse.cz> --- mm/truncate.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mm/truncate.c b/mm/truncate.c index 6479ed

[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 <j...@suse.cz> --- Documentation/filesystems/caching/netfs-api.txt | 2 -- fs/9p/cache.c | 29 - fs/afs/cache.c

[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 <j...@suse.cz> --- f

[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" <ty...@mit.edu> CC: linux-e...@vger.kernel.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/ext4/inode.c | 12 +

[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 <j...@suse.cz> --- fs/buffer.c | 6 ++ fs/ext4/

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

2017-06-01 Thread Jan Kara
t.edu> Signed-off-by: Jan Kara <j...@suse.cz> --- fs/ext4/file.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index ddca17c7875a..6821070a388b 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -478,12

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

2017-06-01 Thread Jan Kara
on. Fixes: e64855c6cfaa0a80c1b71c5f647cb792dc436668 Signed-off-by: Jan Kara <j...@suse.cz> --- 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 cl

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

2017-06-01 Thread Jan Kara
<darrick.w...@oracle.com> CC: linux-...@vger.kernel.org Signed-off-by: Jan Kara <j...@suse.cz> --- 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

[PATCH 02/35] ext4: Fix SEEK_HOLE

2017-06-01 Thread Jan Kara
ect 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 <wenqing...@taobao.com> Signed-off-by: Jan Kara <j...@suse.cz&

[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 <j...@suse.cz> --- fs/buffer.c | 3 +-- fs/ext4/file.c | 2 +- fs/ext4/inode.c | 5 ++--- fs/fscache/

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

2017-06-01 Thread Jan Kara
-by: Jan Kara <j...@suse.cz> --- 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

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

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

[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 <idryo...@gmail.com> CC: "Yan, Zheng" <z...@redhat.com> CC: ceph-de...@vger.kernel.org Signed-off-by:

[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 <j...@suse.cz> --- mm/filemap.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --gi

[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 <dste...@suse.com> Signed-off-by: Jan Kara <j..

[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 <konishi.ryus...@lab.ntt.co.jp> CC: linux-ni...@vger.kernel.org Signed-off-by: Jan Kara <j...@suse.cz

[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 <jaeg...@kernel.org> CC: linux-f2fs-de...@lists.sourceforge.net Signed-off-by: Jan Kara <j...@suse.cz> --- fs

[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 <j...@suse.cz> --- fs/btrfs/extent_io.c| 6 +++--- fs/ceph/addr.c | 3 +-- fs/ext4/inode.c | 2 +- f

[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 <j...@suse.cz> --- include/linux/pagevec.h | 7 +++ mm/shmem.c | 4 ++-- mm/swap.c | 6 ++ mm/truncate.c | 8 4 files chang

[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 <dhowe...@redhat.com> CC: linux-...@lists.infradead.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/afs/

[PATCH 21/35] gfs2: Use pagevec_lookup_range_tag()

2017-06-01 Thread Jan Kara
We want only pages from given range in gfs2_write_cache_jdata(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: Bob Peterson <rpete...@redhat.com> CC: cluster-de...@redhat.com Signed-off-by: Jan Kara <j...@suse.cz> --- fs/gfs2

[PATCH 28/35] shmem: Use pagevec_lookup_entries()

2017-06-01 Thread Jan Kara
;hu...@google.com> Signed-off-by: Jan Kara <j...@suse.cz> --- mm/shmem.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index a614a9cfb58c..8a6fddec27a1 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -768,10 +768,9 @@ static void shme

[PATCH 34/35] mm: Make find_get_entries_tag() update index

2017-06-01 Thread Jan Kara
Make find_get_entries_tag() update 'start' to index the next page for iteration. Signed-off-by: Jan Kara <j...@suse.cz> --- fs/dax.c| 3 +-- include/linux/pagemap.h | 2 +- mm/filemap.c| 8 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --gi

[PATCH 20/35] f2fs: Use find_get_pages_tag() for looking up single page

2017-06-01 Thread Jan Kara
__get_first_dirty_index() wants to lookup only the first dirty page after given index. There's no point in using pagevec_lookup_tag() for that. Just use find_get_pages_tag() directly. CC: Jaegeuk Kim <jaeg...@kernel.org> CC: linux-f2fs-de...@lists.sourceforge.net Signed-off-by: Jan K

[PATCH 19/35] f2fs: Simplify page iteration loops

2017-06-01 Thread Jan Kara
end == ULONG_MAX. So just remove this dead code. CC: Jaegeuk Kim <jaeg...@kernel.org> CC: linux-f2fs-de...@lists.sourceforge.net Signed-off-by: Jan Kara <j...@suse.cz> --- fs/f2fs/checkpoint.c | 13 --- fs/f2fs/node.c | 65 +++- 2 fi

[PATCH 24/35] mm: Use pagevec_lookup_range_tag() in write_cache_pages()

2017-06-01 Thread Jan Kara
Use pagevec_lookup_range_tag() in write_cache_pages() as it is interested only in pages from given range. Remove unnecessary code resulting from this. Signed-off-by: Jan Kara <j...@suse.cz> --- mm/page-writeback.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-)

[PATCH 32/35] mm: Convert truncate code to pagevec_lookup_entries_range()

2017-06-01 Thread Jan Kara
All radix tree scanning code in truncate paths is interested only in pages from given range. Convert them to pagevec_lookup_entries_range(). Signed-off-by: Jan Kara <j...@suse.cz> --- mm/truncate.c | 52 +--- 1 file changed, 9 insertions(

[PATCH 29/35] mm: Make pagevec_lookup_entries() update index

2017-06-01 Thread Jan Kara
Make pagevec_lookup_entries() (and underlying find_get_entries()) update index to the next page where iteration should continue. This is mostly for consistency with pagevec_lookup() and future pagevec_lookup_entries_range(). Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/pagemap.

[PATCH 35/35] mm: Implement find_get_entries_range_tag()

2017-06-01 Thread Jan Kara
-off-by: Jan Kara <j...@suse.cz> --- fs/dax.c| 12 +++- include/linux/pagemap.h | 3 ++- mm/filemap.c| 36 ++-- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 4b295c544fd4..acf17b

[PATCH 27/35] shmem: Use pagevec_lookup() in shmem_unlock_mapping()

2017-06-01 Thread Jan Kara
The comment about find_get_pages() returning if it finds a row of swap entries seems to be stale. Use pagevec_lookup() in shmem_unlock_mapping() to simplify the code. CC: Hugh Dickins <hu...@google.com> Signed-off-by: Jan Kara <j...@suse.cz> --- mm/shmem.c | 14 ++ 1 fil

[PATCH 30/35] mm: Implement find_get_entries_range()

2017-06-01 Thread Jan Kara
Implement a variant of find_get_entries() that stops iterating at given index. Some callers want this, so let's provide the interface. Also it makes the interface consistent with find_get_pages(). Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/pagemap.h | 13 ++--- i

[PATCH 17/35] ext4: Use pagevec_lookup_range_tag()

2017-06-01 Thread Jan Kara
We want only pages from given range in ext4_writepages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. CC: "Theodore Ts'o" <ty...@mit.edu> CC: linux-e...@vger.kernel.org Signed-off-by: Jan Kara <j...@suse.cz> ---

[PATCH 31/35] shmem: Convert to pagevec_lookup_entries_range()

2017-06-01 Thread Jan Kara
Convert radix tree scanners to use pagevec_lookup_entries_range() and find_get_entries_range() since they all want only entries from given range. CC: Hugh Dickins <hu...@google.com> Signed-off-by: Jan Kara <j...@suse.cz> --- mm/shmem.c | 23 +++ 1 file changed,

[PATCH 04/35] dax: Fix inefficiency in dax_writeback_mapping_range()

2017-06-01 Thread Jan Kara
: 9973c98ecfda3a1dfcab981665b5f1e39bcde64a Signed-off-by: Jan Kara <j...@suse.cz> --- fs/dax.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/dax.c b/fs/dax.c index c22eaf162f95..c204445a69b0 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -859,6 +859,7 @@ int dax_writeback_mapping_range(

Re: [PATCH 09/10] xfs: nowait aio support

2017-05-31 Thread Jan Kara
eturned if io submission would block. Honza -- Jan Kara <j...@suse.com> 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

Re: [PATCH 09/10] xfs: nowait aio support

2017-05-29 Thread Jan Kara
ly user? I > understand the block layer can block if it has too many requests though. Well, submitting such write will have to wait for read of metadata from disk. That is certainly considered blocking so Christoph is right that we must return EAGAIN in such case.

Re: [PATCH 06/10] fs: Introduce IOMAP_NOWAIT

2017-05-25 Thread Jan Kara
y: Christoph Hellwig <h...@lst.de> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > fs/iomap.c| 2 ++ > include/linux/iomap.h | 1 + > 2 files changed, 3 insert

Re: [PATCH 05/10] fs: return if direct write will trigger writeback

2017-05-25 Thread Jan Kara
y such as page locks, dirty throttling logic, page loading > from disk etc. which cannot be taken care of. > > Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good

Re: [PATCH 04/10] fs: Introduce RWF_NOWAIT

2017-05-25 Thread Jan Kara
ristoph Hellwig <h...@lst.de> Looks good now. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > fs/9p/vfs_file.c| 3 +++ > fs/aio.c| 13 + > fs/ceph/file.c

Re: [PATCH 03/10] fs: Use RWF_* flags for AIO operations

2017-05-25 Thread Jan Kara
-by: Christoph Hellwig <h...@lst.de> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > fs/aio.c | 8 +++- > include/uapi/linux/aio_abi.h | 2 +- > 2 files change

Re: [PATCH 02/10] fs: Introduce filemap_range_has_page()

2017-05-25 Thread Jan Kara
writeback of previous > writes. > > Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza

Re: [PATCH 01/10] fs: Separate out kiocb flags setup based on RWF_* flags

2017-05-25 Thread Jan Kara
On Wed 24-05-17 11:41:41, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues <rgold...@suse.com> > > Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good. You can add: Revie

Re: [PATCH 04/10] fs: Introduce RWF_NOWAIT

2017-05-15 Thread Jan Kara
pr_debug("EFAULT: aio_key\n"); I think you need to also check here that the IO is write. So that NOWAIT reads don't silently pass. Honza -- Jan Kara <j...@suse.com> 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 v4 21/27] mm: clean up error handling in write_one_page

2017-05-15 Thread Jan Kara
ack error since then. > > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks good to me. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Honza > --- > mm/page-writeback.c | 11 +-- > 1

Re: [PATCH v4 22/27] jbd2: don't reset error in journal_finish_inode_data_buffers

2017-05-15 Thread Jan Kara
On Tue 09-05-17 11:49:25, Jeff Layton wrote: > Now that we don't clear writeback errors after fetching them, there is > no need to reset them. This is also potentially racy. > > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks good. You can add: Reviewed-by: Jan

Re: [PATCH v4 19/27] buffer: set errors in mapping at the time that the error occurs

2017-05-15 Thread Jan Kara
check this flag in order to set the error in the > mapping. > > This sets the error in the mapping earlier, at the time that it's first > detected. > > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks good to me. You can add: Reviewed-by: Jan Kara <j...@suse.cz> Sma

Re: [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-15 Thread Jan Kara
d this is not a problem specific to f2fs. For example ext2 also uses this scheme where block devices' mapping is the metadata mapping). And we need to merge error information from these two mappings so for the stamping scheme to work, we'd need two stamps stored in struct file. One for data mappi

Re: [RFC PATCH v1 00/30] fs: inode->i_version rework and optimization

2017-05-12 Thread Jan Kara
On Thu 11-05-17 14:59:43, J. Bruce Fields wrote: > On Wed, Apr 05, 2017 at 02:14:09PM -0400, J. Bruce Fields wrote: > > On Wed, Apr 05, 2017 at 10:05:51AM +0200, Jan Kara wrote: > > > 1) Keep i_version as is, make clients also check for i_ctime. > > > > That would

  1   2   3   >