[f2fs-dev] [PATCH] f2fs: fix bad prefetchw of NULL page

2017-03-13 Thread Kinglong Mee
For f2fs_read_data_pages, the f2fs_mpage_readpages gets "page == NULL", so that, the prefetchw(&page->flags) is operated on NULL. Fixes: f1e8866016 ("f2fs: expose f2fs_mpage_readpages") Signed-off-by: Kinglong Mee --- fs/f2fs/data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -

Re: [f2fs-dev] [PATCH] f2fs: skip scanning free nid bitmap of full NAT blocks

2017-03-13 Thread Chao Yu
On 2017/3/11 2:40, Jaegeuk Kim wrote: > On 03/10, Kinglong Mee wrote: >> On 3/1/2017 17:09, Chao Yu wrote: >>> This patch adds to account free nids for each NAT blocks, and while >>> scanning all free nid bitmap, do check count and skip lookuping in >>> full NAT block. >>> >>> Signed-off-by: Chao Y

[f2fs-dev] [PATCH] f2fs: cover update_free_nid_bitmap with free_list_lock

2017-03-13 Thread Chao Yu
free_nid_bitmap and free_nid_count in update_free_nid_bitmap should be updated atomically, use free_list_lock cover them to avoid race in concurrent scenario. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 1 - fs/f2fs/node.c | 27 +++ 2 files changed, 11 insertions(+), 17

[f2fs-dev] [PATCH v2] f2fs: allow write page cache when writting cp

2017-03-13 Thread Yunlei He
This patch allow write data to normal file when writting new checkpoint. Signed-off-by: Yunlei He --- fs/f2fs/checkpoint.c | 26 +- fs/f2fs/data.c | 23 --- fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 1 + 4 files changed, 35 insertions(

Re: [f2fs-dev] [PATCH] f2fs: cover update_free_nid_bitmap with free_list_lock

2017-03-13 Thread Kinglong Mee
On 3/13/2017 20:10, Chao Yu wrote: > free_nid_bitmap and free_nid_count in update_free_nid_bitmap should be > updated atomically, use free_list_lock cover them to avoid race in nid_list_lock? Reviewed-by: Kinglong Mee > concurrent scenario. > > Signed-off-by: Chao Yu > --- > fs/f2fs/f2fs.h |

Re: [f2fs-dev] [PATCH] f2fs: restrict write IO alignment condition

2017-03-13 Thread Chao Yu
On 2017/3/11 2:50, Jaegeuk Kim wrote: > On 03/10, Chao Yu wrote: >> We should only align start offset of bio with defined IO_SIZE for below >> conditions: >> a. write IOs >> b. Out-place-update >> c. non-meta page >> >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/data.c | 4 +++- >> 1 file changed,

[f2fs-dev] [PATCH v2] f2fs: restrict write IO alignment condition

2017-03-13 Thread Chao Yu
We should only align start offset of bio with defined IO_SIZE for below conditions: a. mode=lfs mount option b. write IOs c. Out-place-update d. non-meta pages Signed-off-by: Chao Yu --- fs/f2fs/data.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c

Re: [f2fs-dev] [PATCH v2] f2fs: restrict write IO alignment condition

2017-03-13 Thread Kinglong Mee
On 3/13/2017 21:02, Chao Yu wrote: > We should only align start offset of bio with defined IO_SIZE for below > conditions: > a. mode=lfs mount option > b. write IOs > c. Out-place-update > d. non-meta pages > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 10 +++--- > 1 file changed, 7 in

Re: [f2fs-dev] [PATCH v3] f2fs: cleanup the disk level filename updating

2017-03-13 Thread Jaegeuk Kim
On 03/10, Kinglong Mee wrote: > As discuss with Jaegeuk and Chao, > "Once checkpoint is done, f2fs doesn't need to update there-in filename at > all." > > The disk-level filename is used only one case, > 1. create a file A under a dir > 2. sync A > 3. godown > 4. umount > 5. mount (roll_forward)

Re: [f2fs-dev] [PATCH 2/2] f2fs: avoid move encrypted block in BG_GC if it has been in memory

2017-03-13 Thread Jaegeuk Kim
On 03/10, Yunlei He wrote: > If an encrypted block has been read to memory, we just dirty it > and return directly. > > Signed-off-by: Yunlei He > --- > fs/f2fs/gc.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index 418fd98.

Re: [f2fs-dev] [PATCH] f2fs: cover update_free_nid_bitmap with free_list_lock

2017-03-13 Thread Jaegeuk Kim
On 03/13, Kinglong Mee wrote: > On 3/13/2017 20:10, Chao Yu wrote: > > free_nid_bitmap and free_nid_count in update_free_nid_bitmap should be > > updated atomically, use free_list_lock cover them to avoid race in > > nid_list_lock? Think so. I merged a modified one in dev-test and started to test

Re: [f2fs-dev] [PATCH v2] f2fs: restrict write IO alignment condition

2017-03-13 Thread Jaegeuk Kim
On 03/13, Chao Yu wrote: > We should only align start offset of bio with defined IO_SIZE for below > conditions: > a. mode=lfs mount option > b. write IOs > c. Out-place-update > d. non-meta pages > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 10 +++--- > 1 file changed, 7 insertions(+

Re: [f2fs-dev] [PATCH v3] f2fs: cleanup the disk level filename updating

2017-03-13 Thread Kinglong Mee
On 3/14/2017 02:23, Jaegeuk Kim wrote: > On 03/10, Kinglong Mee wrote: >> As discuss with Jaegeuk and Chao, >> "Once checkpoint is done, f2fs doesn't need to update there-in filename at >> all." >> >> The disk-level filename is used only one case, >> 1. create a file A under a dir >> 2. sync A >>

Re: [f2fs-dev] [PATCH] f2fs: cover update_free_nid_bitmap with free_list_lock

2017-03-13 Thread Chao Yu
On 2017/3/14 3:57, Jaegeuk Kim wrote: > On 03/13, Kinglong Mee wrote: >> On 3/13/2017 20:10, Chao Yu wrote: >>> free_nid_bitmap and free_nid_count in update_free_nid_bitmap should be >>> updated atomically, use free_list_lock cover them to avoid race in >> >> nid_list_lock? > > Think so. > I merge

Re: [f2fs-dev] [PATCH 2/2] f2fs: avoid move encrypted block in BG_GC if it has been in memory

2017-03-13 Thread heyunlei
Hi Jaegeuk, On 2017/3/14 2:30, Jaegeuk Kim wrote: > On 03/10, Yunlei He wrote: >> If an encrypted block has been read to memory, we just dirty it >> and return directly. >> >> Signed-off-by: Yunlei He >> --- >> fs/f2fs/gc.c | 11 +-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >>

Re: [f2fs-dev] [PATCH 2/2] f2fs: avoid move encrypted block in BG_GC if it has been in memory

2017-03-13 Thread Chao Yu
On 2017/3/14 9:37, heyunlei wrote: > > Hi Jaegeuk, > On 2017/3/14 2:30, Jaegeuk Kim wrote: >> On 03/10, Yunlei He wrote: >>> If an encrypted block has been read to memory, we just dirty it >>> and return directly. >>> >>> Signed-off-by: Yunlei He >>> --- >>> fs/f2fs/gc.c | 11 +-- >>> 1

Re: [f2fs-dev] [PATCH] fscrypt: remove broken support for detecting keyring key revocation

2017-03-13 Thread Michael Halcrow
On Tue, Feb 21, 2017 at 03:07:11PM -0800, Eric Biggers wrote: > From: Eric Biggers > > Filesystem encryption ostensibly supported revoking a keyring key > that had been used to "unlock" encrypted files, causing those files > to become "locked" again. This was, however, buggy for several > reasons