Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: fix a missing discard prefree segments

2016-12-20 Thread heyunlei
Hi Chao, On 2016/12/21 10:27, Chao Yu wrote: > On 2016/12/21 10:02, Chao Yu wrote: >> Hi Jaegeuk, Yunlei, >> >> On 2016/12/20 11:11, Yunlei He wrote: >>> If userspace issue a fstrim with a range not involve prefree segments, >>> it will reuse these segments without discard. This patch fix it. >> >

Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: fix a missing discard prefree segments

2016-12-20 Thread Chao Yu
On 2016/12/21 11:35, heyunlei wrote: > Hi Chao, > > On 2016/12/21 10:27, Chao Yu wrote: >> On 2016/12/21 10:02, Chao Yu wrote: >>> Hi Jaegeuk, Yunlei, >>> >>> On 2016/12/20 11:11, Yunlei He wrote: If userspace issue a fstrim with a range not involve prefree segments, it will reuse these

Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: fix a missing discard prefree segments

2016-12-20 Thread Chao Yu
On 2016/12/21 10:02, Chao Yu wrote: > Hi Jaegeuk, Yunlei, > > On 2016/12/20 11:11, Yunlei He wrote: >> If userspace issue a fstrim with a range not involve prefree segments, >> it will reuse these segments without discard. This patch fix it. > >>From v1 patch, I guess originally Yunlei wants to s

Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: fix a missing discard prefree segments

2016-12-20 Thread Chao Yu
Hi Jaegeuk, Yunlei, On 2016/12/20 11:11, Yunlei He wrote: > If userspace issue a fstrim with a range not involve prefree segments, > it will reuse these segments without discard. This patch fix it. >From v1 patch, I guess originally Yunlei wants to skip clearing prefree >segments which is not be

Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: add a case of no need to read a page in write begin

2016-12-20 Thread Chao Yu
On 2016/12/21 2:03, Jaegeuk Kim wrote: > On 12/20, Yunlei He wrote: >> If the range we write cover the whole valid data in the last page, >> we do not need to read it. >> >> Signed-off-by: Yunlei He >> --- >> fs/f2fs/data.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff -

Re: [f2fs-dev] [PATCH 2/9] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2016-12-20 Thread Darrick J. Wong
On Tue, Dec 20, 2016 at 08:24:13AM +1100, Dave Chinner wrote: > On Thu, Dec 15, 2016 at 03:07:08PM +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > Now that the page allocator offers __GFP_NOLOCKDEP let's introduce > > KM_NOLOCKDEP alias for the xfs allocation APIs. While we are at it >

Re: [f2fs-dev] [RFC PATCH] mm: introduce kv[mz]alloc helpers

2016-12-20 Thread Joe Perches
On Tue, 2016-12-20 at 14:50 +0100, Michal Hocko wrote: > On Wed 14-12-16 09:59:16, Michal Hocko wrote: > > On Tue 13-12-16 14:07:33, Joe Perches wrote: > > > On Tue, 2016-12-13 at 11:14 +0100, Michal Hocko wrote: > > > > Are there any more comments or objections to this patch? Is this a good > > >

Re: [f2fs-dev] [PATCH 2/9] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2016-12-20 Thread Michal Hocko
On Tue 20-12-16 08:24:13, Dave Chinner wrote: > On Thu, Dec 15, 2016 at 03:07:08PM +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > Now that the page allocator offers __GFP_NOLOCKDEP let's introduce > > KM_NOLOCKDEP alias for the xfs allocation APIs. While we are at it > > also change KM

Re: [f2fs-dev] [PATCH 2/9] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2016-12-20 Thread Dave Chinner
On Thu, Dec 15, 2016 at 03:07:08PM +0100, Michal Hocko wrote: > From: Michal Hocko > > Now that the page allocator offers __GFP_NOLOCKDEP let's introduce > KM_NOLOCKDEP alias for the xfs allocation APIs. While we are at it > also change KM_NOFS users introduced by b17cb364dbbb ("xfs: fix missing

Re: [f2fs-dev] [RFC PATCH] mm: introduce kv[mz]alloc helpers

2016-12-20 Thread Michal Hocko
On Wed 14-12-16 09:59:16, Michal Hocko wrote: > On Tue 13-12-16 14:07:33, Joe Perches wrote: > > On Tue, 2016-12-13 at 11:14 +0100, Michal Hocko wrote: > > > Are there any more comments or objections to this patch? Is this a good > > > start or kv[mz]alloc has to provide a way to cover GFP_NOFS use

Re: [f2fs-dev] [PATCH 2/9] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2016-12-20 Thread Dave Chinner
On Mon, Dec 19, 2016 at 02:06:19PM -0800, Darrick J. Wong wrote: > On Tue, Dec 20, 2016 at 08:24:13AM +1100, Dave Chinner wrote: > > On Thu, Dec 15, 2016 at 03:07:08PM +0100, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Now that the page allocator offers __GFP_NOLOCKDEP let's introduc

Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: add a case of no need to read a page in write begin

2016-12-20 Thread Jaegeuk Kim
On 12/20, Yunlei He wrote: > If the range we write cover the whole valid data in the last page, > we do not need to read it. > > Signed-off-by: Yunlei He > --- > fs/f2fs/data.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > index 9

[f2fs-dev] [PATCH] f2fs: use rb_entry_safe

2016-12-20 Thread Geliang Tang
Use rb_entry_safe() instead of open-coding it. Signed-off-by: Geliang Tang --- fs/f2fs/extent_cache.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 4db44da..f79bfb2 100644 --- a/fs/f2fs/extent_cache.c