Re: [f2fs-dev] [PATCH] f2fs: no need lock_op in f2fs_write_inline_data

2017-02-23 Thread heyunlei
Hi Jaegeuk, Can you explain more about this? Besides, how about inplace update? On 2017/2/24 3:45, Jaegeuk Kim wrote: > In this case, however, I don't think we > can do like this. -- Check out the

Re: [f2fs-dev] [PATCH 2/2] f2fs:use fggc_set_cold_data instead of set_cold_data in fggc

2017-02-23 Thread Hou Pengyang
On 2017/2/24 10:07, Chao Yu wrote: > On 2017/2/23 10:04, Hou Pengyang wrote: >> On 2017/2/23 8:39, Jaegeuk Kim wrote: >>> Hi Pengyang, Hi Chao, >>> >>> On 02/22, Hou Pengyang wrote: When no dirty colde segment for fggc ssr, we do NOT set_cold_data. >>> >>> The get_ssr_segment() finds a victim

Re: [f2fs-dev] [PATCH 2/2] f2fs:use fggc_set_cold_data instead of set_cold_data in fggc

2017-02-23 Thread Chao Yu
On 2017/2/23 10:04, Hou Pengyang wrote: > On 2017/2/23 8:39, Jaegeuk Kim wrote: >> Hi Pengyang, >> >> On 02/22, Hou Pengyang wrote: >>> When no dirty colde segment for fggc ssr, we do NOT set_cold_data. >> >> The get_ssr_segment() finds a victim segment across all the hot/warm/cold >> data >>

Re: [f2fs-dev] [PATCH 1/2] f2fs fg_gc: node segment is prior to data segment selected victim

2017-02-23 Thread Chao Yu
On 2017/2/22 18:28, Hou Pengyang wrote: > As data segment gc may lead dnode dirty, so the greedy cost for data segment > should be > valid blocks * 2, that is data segment is prior to node segment. > > Signed-off-by: Hou Pengyang Reviewed-by: Chao Yu

Re: [f2fs-dev] Multiple Devices

2017-02-23 Thread Jaegeuk Kim
On 02/23, riya khanna wrote: > Thanks! I will give it a try. > > Does it also move blocks from one device to another in the background? Not yet, we've been working on it. Thanks, > > On Thu, Feb 23, 2017 at 4:29 PM, Jaegeuk Kim wrote: > > On 02/23, riya khanna wrote: > >>

Re: [f2fs-dev] [PATCH 2/3 v2] f2fs: add bitmaps for empty or full NAT blocks

2017-02-23 Thread Jaegeuk Kim
Change log from v1: - modified some condition checks suggested by Chao This patches adds bitmaps to represent empty or full NAT blocks containing free nid entries. If we can find valid crc|cp_ver in the last block of checkpoint pack, we'll use these bitmaps when building free nids. In order to

Re: [f2fs-dev] Multiple Devices

2017-02-23 Thread riya khanna
Thanks! I will give it a try. Does it also move blocks from one device to another in the background? On Thu, Feb 23, 2017 at 4:29 PM, Jaegeuk Kim wrote: > On 02/23, riya khanna wrote: >> Hi, >> >> >> I see support for multiple devices in f2fs-tools. Can f2fs be mounted >> on

[f2fs-dev] Multiple Devices

2017-02-23 Thread riya khanna
Hi, I see support for multiple devices in f2fs-tools. Can f2fs be mounted on multiple devices? -Riya -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org!

Re: [f2fs-dev] [PATCH] f2fs: no need lock_op in f2fs_write_inline_data

2017-02-23 Thread Jaegeuk Kim
Hi Yunlei, On 02/23, Yunlei He wrote: > Similar as f2fs_write_inode, f2fs_write_inline_data just > mark inode page dirty, so it's no need to write inline data > under read lock of cp_rwsem. We count # of dirty inodes that we need to flush through f2fs_write_inode, so it's fine to go without

Re: [f2fs-dev] [PATCH 1/4] f2fs: avoid very large discard command

2017-02-23 Thread Jaegeuk Kim
On 02/23, Christoph Hellwig wrote: > On Wed, Feb 22, 2017 at 08:28:47PM -0800, Jaegeuk Kim wrote: > > This patch adds MAX_DISCARD_BLOCKS() to avoid issuing too much large single > > discard command. > > Needs an explanation in the code on why this number was chosen. No need to add a trivial

Re: [f2fs-dev] [PATCH 3/3] f2fs: avoid reading NAT page by get_node_info

2017-02-23 Thread Jaegeuk Kim
On 02/23, Chao Yu wrote: > On 2017/2/14 10:06, Jaegeuk Kim wrote: > > We've not seen this buggy case for a long time, so it's time to avoid this > > unnecessary get_node_info() call which reading NAT page to cache nat entry. > > > > Signed-off-by: Jaegeuk Kim > > --- > >

[f2fs-dev] [PATCH] vfs: hoist {XFS, EXT4, F2FS}_IOC_{GOING, SHUT}DOWN to the VFS

2017-02-23 Thread Darrick J. Wong
ext4, f2fs, and XFS expose the same shutdown ioctl with the same parameters, so let's hoist the whole mess into the vfs headers. Signed-off-by: Darrick J. Wong --- v2: pull in f2fs as well --- fs/ext4/ext4.h | 10 -- fs/ext4/ioctl.c | 12

Re: [f2fs-dev] [RFC] add ovp valid_blocks check for bg gc victim to fg_gc

2017-02-23 Thread Chao Yu
On 2017/2/18 4:17, Jaegeuk Kim wrote: > On 02/17, Hou Pengyang wrote: > > ... > On 2017/2/17 7:48, Jaegeuk Kim wrote: > + ovp_count = SM_I(sbi)->ovp_segments << sbi->log_blocks_per_seg; About the ovp_count calculation, in mkfs.f2fs, we get ovp_segment by

[f2fs-dev] [PATCH] f2fs: no need lock_op in f2fs_write_inline_data

2017-02-23 Thread Yunlei He
Similar as f2fs_write_inode, f2fs_write_inline_data just mark inode page dirty, so it's no need to write inline data under read lock of cp_rwsem. Signed-off-by: Yunlei He --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c

Re: [f2fs-dev] [PATCH 1/2] f2fs: replace __get_victim by dirty_segments in FG_GC

2017-02-23 Thread Chao Yu
On 2017/2/18 3:15, Jaegeuk Kim wrote: > Hi Yunlei, > > I also removed "segno = NULL_SEGNO;" in the beginning part near gc_more. > > Thanks, > > On 02/17, Yunlei He wrote: >> In FG_GC process, it will search victim section twice. This will >> cause some dirty section with less valid blocks skip

Re: [f2fs-dev] [PATCH 2/2] f2fs: remove unnecessary wait in write_begin

2017-02-23 Thread Chao Yu
On 2017/2/18 2:21, Jaegeuk Kim wrote: > On 02/17, Yunlei He wrote: >> It has already waited page stable in grab_cache_page_write_begin, >> so we remove this unnecessary wait. > > I also got a deadlock in my perf test, and I wrote another patch to resolve it > by replacing

[f2fs-dev] [PATCH] f2fs: avoid m_flags overlay when allocating more data blocks

2017-02-23 Thread Kinglong Mee
When more than one data blocks are allocated, the F2FS_MAP_UNWRITTEN/MAPPED flags will be overlapped by F2FS_MAP_NEW at the later times. Signed-off-by: Kinglong Mee --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c

Re: [f2fs-dev] [PATCH 3/3] f2fs: avoid reading NAT page by get_node_info

2017-02-23 Thread Chao Yu
On 2017/2/14 10:06, Jaegeuk Kim wrote: > We've not seen this buggy case for a long time, so it's time to avoid this > unnecessary get_node_info() call which reading NAT page to cache nat entry. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/node.c | 11 +-- > 1 file

Re: [f2fs-dev] [PATCH 2/3] f2fs: add bitmaps for empty or full NAT blocks

2017-02-23 Thread Chao Yu
On 2017/2/14 10:06, Jaegeuk Kim wrote: > This patches adds bitmaps to represent empty or full NAT blocks containing > free nid entries. > > If we can find valid crc|cp_ver in the last block of checkpoint pack, we'll > use these bitmaps when building free nids. In order to avoid checkpointing >

[f2fs-dev] [PATCH] f2fs: replace rw semaphore extent_tree_lock with mutex lock

2017-02-23 Thread Yunlei He
This patch replace rw semaphore extent_tree_lock with mutex lock for no read cases with this lock. Signed-off-by: Yunlei He --- fs/f2fs/extent_cache.c | 22 +++--- fs/f2fs/f2fs.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git

Re: [f2fs-dev] [PATCH] vfs: hoist {XFS, EXT4}_IOC_{GOING, SHUT}DOWN to the VFS

2017-02-23 Thread Jaegeuk Kim
Hello, On 02/23, Chao Yu wrote: > Hi Darrick, > > On 2017/2/23 15:52, Darrick J. Wong wrote: > > ext4 and XFS expose the same shutdown ioctl with the same parameters, > > so let's hoist the whole mess into the vfs headers. > > Could you cover f2fs in this patch since f2fs has already supported

Re: [f2fs-dev] [PATCH 1/4] mkfs.f2fs: make sure clean all reset dnodes

2017-02-23 Thread Chao Yu
On 2017/2/14 10:05, Jaegeuk Kim wrote: > From: Kinglong Mee > > memset(raw_node, 0, F2FS_BLKSIZE) sets the next_blkaddr to zero, > so that, only one reset dnode is cleaned always. > > Fixes: ad042d9194f5 "mkfs.f2fs: reset dnode with zeros", > Signed-off-by: Kinglong Mee

Re: [f2fs-dev] [PATCH 3/5] f2fs: move flush tracepoint

2017-02-23 Thread Chao Yu
On 2017/2/4 7:48, Jaegeuk Kim wrote: > This patch moves the tracepoint location for flush command. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu -- Check out the vibrant

Re: [f2fs-dev] [PATCH 4/5] f2fs: move write_node_page above fsync_node_pages

2017-02-23 Thread Chao Yu
On 2017/2/4 7:48, Jaegeuk Kim wrote: > This patch just moves write_node_page and introduces an inner function. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu -- Check out

[f2fs-dev] [PATCH 2/3] f2fs: remove unsafe bitmap checking

2017-02-23 Thread Hou Pengyang
proc A: proc B: - writeback_sb_inodes - __writeback_single_inode - do_writepages - f2fs_write_node_pages - f2fs_balance_fs_bg - write_checkpoint - build_free_nids- flush_nat_entries - __build_free_nids - __flush_nat_entry_set -

[f2fs-dev] [PATCH 3/3] f2fs: skip dirty bitmap scanning when no dirty segments

2017-02-23 Thread Hou Pengyang
Signed-off-by: Hou Pengyang --- fs/f2fs/gc.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 6c996e3..eaf9e68 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -293,13 +293,22 @@ static int

[f2fs-dev] [PATCH 1/3] f2fs: init local extent_info to avoid stale stack info in tp

2017-02-23 Thread Hou Pengyang
To avoid such stale(fops, blk, len) info in f2fs_lookup_extent_tree_end tp dio-23095 [005] ...1 17878.856859: f2fs_lookup_extent_tree_end: dev = (259,30), ino = 856, pgofs = 0, ext_info(fofs: 3441207040, blk: 4294967232, len: 3481143808)

Re: [f2fs-dev] [PATCH] vfs: hoist {XFS, EXT4}_IOC_{GOING, SHUT}DOWN to the VFS

2017-02-23 Thread Chao Yu
Hi Darrick, On 2017/2/23 15:52, Darrick J. Wong wrote: > ext4 and XFS expose the same shutdown ioctl with the same parameters, > so let's hoist the whole mess into the vfs headers. Could you cover f2fs in this patch since f2fs has already supported SHUTDOWN ioctl? Thanks,