[PATCH v2 0/7] f2fs: Add tracepoints support in f2fs filesystem

2013-03-17 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints in f2fs filesystem for tracing the filesystem operations for information/debugging purpose if needed. All the tracepoints are clubbed with respect to functionalities. Namjae Jeon(7): f2fs: add tracepoints for sync operations and inode operations f2fs: add

[PATCH] [SCSI]: print the msgbytes and statusbyte from scsi result

2013-03-17 Thread Namjae Jeon
From: Namjae Jeon Introduce msgbyte and statusbyte in the prints as part of the result which is returned by the lower layer driver in response to SCSI command issued, in case of any error conditions. Purpose of adding these prints is to convey, during any I/O error case, which condition exactly

[PATCH 5/5] f2fs: avoid BUG_ON from check_nid_range and update return path in do_read_inode

2013-03-17 Thread Namjae Jeon
From: Namjae Jeon In function check_nid_range, there is no need to trigger BUG_ON and make kernel stop. Instead it could just check and indicate the inode number to be EINVAL. Update the return path in do_read_inode to use the return from check_nid_range. Signed-off-by: Namjae Jeon Signed-off

[PATCH 4/5] f2fs: remove nid_free from f2fs_new_inode

2013-03-17 Thread Namjae Jeon
From: Namjae Jeon we can remove nid_free from new inode allocation part. Since, nid_free is used to check if we need to free alloced nid in case of failure. Instead we can directly call alloc_nid_failed from that point, as there is no dependency in that path. Signed-off-by: Namjae Jeon Signed

[PATCH 3/5] f2fs: fix return values from validate superblock

2013-03-17 Thread Namjae Jeon
From: Namjae Jeon validate super block is not returning with proper values. When failure from sb_bread it should reflect there is an EIO otherwise it should return of EINVAL. Returning, '1' is not conveying proper message as the return type. Signed-off-by: Namjae Jeon Signed-of

[PATCH 2/5] f2fs: reorganize f2fs_setxattr

2013-03-17 Thread Namjae Jeon
From: Namjae Jeon make use of F2FS_NAME_LEN for name length checking, change return conditions at few places, by assigning storing the errorvalue in 'error' and making a common exit path. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/xattr.c | 18 ++-

[PATCH 1/5] f2fs: notify when discard is not supported

2013-03-17 Thread Namjae Jeon
From: Namjae Jeon Change f2fs so that a warning is emitted when an attempt is made to mount a filesystem with the unsupported discard option. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/super.c |9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs

Re: [PATCH v2] wait while adding MMC host to ensure root mounts

2013-03-13 Thread Namjae Jeon
2013/3/14, Sergey Yanovich : > MMC hosts are added asynchronously. We need to wait until detect returns to > avoid failed root filesystem mounts. > ---8<--- > VFS: Cannot open root device "mmcblk0p1" or unknown-block(0,0): error -6 > Please append a correct "root=" boot option; here are the availab

Re: [PATCH v3] fat: editions to support fat_fallocate

2013-03-12 Thread Namjae Jeon
2013/3/12, OGAWA Hirofumi : > Namjae Jeon writes: > >>> If so, probably, I didn't clear my opinion/suggestion, or misled >>> you. Sorry about it. >>> >>> My opinion/suggestion is, "it should be before umount()". >>> I.e. fallocate

Re: [PATCH v3] fat: editions to support fat_fallocate

2013-03-12 Thread Namjae Jeon
2013/3/12, OGAWA Hirofumi : > Namjae Jeon writes: > >>> This choose ->release(). BTW, we would also be able to do this only >>> ->evict_inode(), although I'm not thinking yet which one is better. >>> >>> If you had conclusion, it would be nic

Re: [PATCH v3] fat: editions to support fat_fallocate

2013-03-11 Thread Namjae Jeon
2013/3/9, OGAWA Hirofumi : > Namjae Jeon writes: > >> static int fat_file_release(struct inode *inode, struct file *filp) >> { >> +struct super_block *sb = inode->i_sb; >> +loff_t mmu_private_ideal = (inode->i_size + (sb->s_blocksize-1)) &am

Re: [PATCH v3] fat: editions to support fat_fallocate

2013-03-11 Thread Namjae Jeon
Hi. Andrew. >> >> static int fat_file_release(struct inode *inode, struct file *filp) >> { >> +struct super_block *sb = inode->i_sb; >> +loff_t mmu_private_ideal = (inode->i_size + (sb->s_blocksize-1)) & >> +~(sb->s_blocksize-1); > > Stylistically, it looks

Re: [PATCH 4/5] f2fs: align f2fs maximum name length to linux based filesystem

2013-03-07 Thread Namjae Jeon
2013/3/8, Jaegeuk Kim : > 2013-03-04 (월), 15:25 +0900, Namjae Jeon: >> 2013/3/3, Jaegeuk Kim : >> > We should not change the on-disk layout. >> > Instead, simply we can deal with it by changing original condition >> > check >> > like below. >> &

Re: [PATCH 3/5] f2fs: move f2fs_balance_fs to correct place in unlink

2013-03-07 Thread Namjae Jeon
2013/3/8, Jaegeuk Kim : > 2013-03-04 (월), 15:10 +0900, Namjae Jeon: >> 2013/3/3, Jaegeuk Kim : >> > 2013-03-02 (토), 12:41 +0900, Namjae Jeon: >> >> From: Namjae Jeon >> >> >> >> Actual dirty of pages will occur in f2fs_delete_entry

[PATCH v3] fat: editions to support fat_fallocate

2013-03-07 Thread Namjae Jeon
From: Namjae Jeon Implement preallocation via the fallocate syscall on VFAT partitions. Change Log: v3: Release preallocated blocks at file release. With FALLOC_FL_KEEP_SIZE, there is no way to distinguish if the mismatch between i_size and no. of clusters allocated is a consequence of

Re: [PATCH v7 0/7] fat (exportfs): support stale_rw and nostale_ro mount option.

2013-03-03 Thread Namjae Jeon
2013/3/2, OGAWA Hirofumi : > Namjae Jeon writes: > >> From: Namjae Jeon >> >> This patch set eliminates the client side ESTALE errors when a FAT >> partition >> exported over NFS has it's dentries evicted from the cache. The idea is >> to >> f

Re: [PATCH 4/5] f2fs: align f2fs maximum name length to linux based filesystem

2013-03-03 Thread Namjae Jeon
ux-fsde...@vger.kernel.org, linux-kernel@vger.kernel.org, > linux-f2fs-de...@lists.sourceforge.net > > The maximum filename length supported in linux is 255 characters. > So let's follow that. > > Signed-off-by: Namjae Jeon > Signed-off-by: Amit Sahrawat > Signed-off-by

Re: [PATCH 3/5] f2fs: move f2fs_balance_fs to correct place in unlink

2013-03-03 Thread Namjae Jeon
2013/3/3, Jaegeuk Kim : > 2013-03-02 (토), 12:41 +0900, Namjae Jeon: >> From: Namjae Jeon >> >> Actual dirty of pages will occur in f2fs_delete_entry so move the >> f2fs_balance_fs just before deletion. >> >> Signed-off-by: Namjae Jeon >> Signed-off-

[PATCH v7 7/7] Documentation: update nfs option in filesystem/vfat.txt

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Add descriptions about 'stale_rw' and 'nostale_ro' nfs options in filesystem/vfat.txt Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N Signed-off-by: Amit Sahrawat --- Documentation/filesystems/vfat.txt | 26 +-

[PATCH v7 5/7] fat (exportfs): rebuild inode if ilookup() fails

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon If the cache lookups fail,use the i_pos value to find the directory entry of the inode and rebuild the inode.Since this involves accessing the FAT media, do this only if the nostale_ro nfs mount option is specified. Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N

[PATCH v7 6/7] fat (exportfs): rebuild directory-inode if fat_dget()

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon This patch enables rebuilding of directory inodes which are not present in the cache.This is done by traversing the disk clusters to find the directory entry of the parent directory and using its i_pos to build the inode. The traversal is done by fat_scan_logstart() which is

[PATCH v7 4/7] fat: restructure export_operations

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Define two nfs export_operation structures,one for 'stale_rw' mounts and the other for 'nostale_ro'. The latter uses i_pos as a basis for encoding and decoding file handles. Also, assign i_pos to kstat->ino. The logic for rebuilding the inode is added in

[PATCH v7 3/7] fat: introduce a helper fat_get_blknr_offset()

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Introduce helper function to get the block number and offset for a given i_pos value. Use it in __fat_write_inode() now and later on in nfs.c Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N Signed-off-by: Amit Sahrawat --- fs/fat/fat.h |7 +++ fs/fat

[PATCH v7 2/7] fat: move fat_i_pos_read to fat.h

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Move fat_i_pos_read to fat.h so that it can be called from nfs.c in the subsequent patches to encode the file handle. Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N Signed-off-by: Amit Sahrawat --- fs/fat/fat.h | 14 ++ fs/fat/inode.c | 14

[PATCH v7 1/7] fat: introduce 2 new values for the -o nfs mount option

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Provide two possible values 'stale_rw' and 'nostale_ro' for the -o nfs mount option.The first one allows all file operations but does not reduce ESTALE errors on memory constrained systems. The second one eliminates ESTALE errors but mounts the filesyst

[PATCH v7 0/7] fat (exportfs): support stale_rw and nostale_ro mount option.

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon This patch set eliminates the client side ESTALE errors when a FAT partition exported over NFS has it's dentries evicted from the cache. The idea is to find the on-disk location_'i_pos' of the dirent of the inode that has been evicted and use it to rebuild the

[PATCH 5/5] f2fs: avoid extra ++ while returning from get_node_path

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon In all the breaking conditions in get_node_path, 'n' is used to track index in offset[] array, but while breaking out also, in all paths n++ is done. So, remove the ++ from breaking paths. Also, avoid reset of 'level=0' in first case. Signed-off-by: Namjae

[PATCH 4/5] f2fs: align f2fs maximum name length to linux based filesystem

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Since, maximum filename length supported in linux is 255 characters. So, there is no need to reserve space for 256 characters in f2fs inode. This aligns the filename length to NFS requests also which also has a default limit of '255'. Signed-off-by: Namjae Jeon Sig

[PATCH 2/5] f2fs: optimize and change return path in lookup_free_nid_list

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Optimize and change return path in lookup_free_nid_list Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/node.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..e24f747 100644

[PATCH 3/5] f2fs: move f2fs_balance_fs to correct place in unlink

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Actual dirty of pages will occur in f2fs_delete_entry so move the f2fs_balance_fs just before deletion. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/namei.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/namei.c b

[PATCH 1/5] f2fs: change victim segmap test condition in get_victim_by_default

2013-03-01 Thread Namjae Jeon
From: Namjae Jeon Instead of checking for victim_segmap(FG_GC) OR (gc_type == BG_GC) && victim_segmap(BG_GC); to continue for the victim selection. The 2 conditions can simply be merged and decision can directly be made using 'gc_type'. Signed-off-by: Namjae Jeon Signed-off

Re: [PATCH 2/2] f2fs: introduce readahead mode of node pages

2013-02-26 Thread Namjae Jeon
2013/2/27, Jaegeuk Kim : > 2013-02-26 (화), 20:52 +0900, Namjae Jeon: >> > @@ -434,7 +434,7 @@ int get_dnode_of_data(struct dnode_of_data *dn, >> > pgoff_t >> > index, int ro) >> >alloc_nid_done(sbi, nids[i]); >> >

Re: [PATCH 1/2] f2fs: read with READ_SYNC when getting dnode page

2013-02-26 Thread Namjae Jeon
2013/2/27, Jaegeuk Kim : > Hi, > > 2013-02-26 (화), 18:35 +0900, Namjae Jeon: >> 2013/2/26, Jaegeuk Kim : >> > It must be set READ_SYNC not READA. >> Hi Jaegeuk. >> Could you please elaborate more? >> Why we need to change READA to READ_SYNC over here, whe

Re: [PATCH 2/2] f2fs: introduce readahead mode of node pages

2013-02-26 Thread Namjae Jeon
> @@ -434,7 +434,7 @@ int get_dnode_of_data(struct dnode_of_data *dn, pgoff_t > index, int ro) > alloc_nid_done(sbi, nids[i]); > mutex_unlock_op(sbi, NODE_NEW); > done = true; > - } else if (ro && i == level && level > 1)

Re: [PATCH 1/2] f2fs: read with READ_SYNC when getting dnode page

2013-02-26 Thread Namjae Jeon
2013/2/26, Jaegeuk Kim : > It must be set READ_SYNC not READA. Hi Jaegeuk. Could you please elaborate more? Why we need to change READA to READ_SYNC over here, when the purpose was to read the node page in READ ahead mode. Thanks. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/node.c | 2 +- > 1

Re: [PATCH 2/8] f2fs: add tracepoints for inode operations

2013-02-19 Thread Namjae Jeon
2013/2/19 Steven Rostedt : > On Tue, 2013-02-19 at 11:33 +0900, Namjae Jeon wrote: >> From: Namjae Jeon > >> +TRACE_EVENT(f2fs_unlink_exit, >> + TP_PROTO(struct dentry *dentry, int ret), >> + >> + TP_ARGS(dentry, ret), >> + >> + TP_STR

[PATCH 8/8] f2fs: add tracepoints to debug checkpoint request

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints to debug checkpoint request. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/f2fs/checkpoint.c|1 + include/trace/events/f2fs.h | 18 ++ 2 files changed, 19 insertions(+) diff --git a/fs/f2fs/checkpoint.c b/fs

[PATCH 7/8] f2fs: add tracepoints for write page operations

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints to debug the various page write operation like data pages, meta pages. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/f2fs/checkpoint.c|2 ++ fs/f2fs/data.c |2 ++ include/trace/events/f2fs.h | 62

[PATCH 5/8] f2fs: add tracepoints for GC threads

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints for tracing the garbage collector threads in f2fs. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/f2fs/gc.c|2 ++ include/trace/events/f2fs.h | 20 2 files changed, 22 insertions(+) diff --git a/fs

[PATCH 6/8] f2fs: add tracepoints to debug the block allocation and fallocate

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints to debug the block allocation and fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/f2fs/data.c |1 + fs/f2fs/file.c |3 ++ include/trace/events/f2fs.h | 76

[PATCH 4/8] f2fs: add tracepoint for tracing the page i/o operations

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints for page i/o operations and block allocation tracing during page read operation. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/f2fs/data.c | 10 ++- include/trace/events/f2fs.h | 68

[PATCH 3/8] f2fs: add tracepoints for truncate operation

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints for tracing the truncate operations like truncate node/data blocks, f2fs_truncate etc. Tracepoints are added at entry and exit of operation to trace the success & failure of operation. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/

[PATCH 2/8] f2fs: add tracepoints for inode operations

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints for tracing the various inode operations like building inode, eviction of inode, link/unlike of inodes. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/f2fs/inode.c |3 ++ fs/f2fs/namei.c |3 ++ include/trace

[PATCH 1/8] f2fs: add tracepoints for sync operations

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints in f2fs for tracing the syncing operations like filesystem sync, file sync enter/exit. It will helf to trace the code under debugging scenarios. Signed-off-by: Namjae Jeon Signed-off-by: Pankaj Kumar --- fs/f2fs/file.c |3 ++ fs/f2fs/super.c

[PATCH 0/8] f2fs: Add tracepoints support in f2fs filesystem

2013-02-18 Thread Namjae Jeon
From: Namjae Jeon Add tracepoints in f2fs filesystem for tracing the filesystem operations for information/debugging purpose if needed. All the tracepoints are clubbed with respect to functionalities. Namjae Jeon(8): f2fs: add tracepoints for sync operations f2fs: add tracepoints for

Re: Read support for fat_fallocate()? (was [v2] fat: editions to support fat_fallocate())

2013-02-18 Thread Namjae Jeon
2013/2/18 OGAWA Hirofumi : > Namjae Jeon writes: > >>> Hm. My concerns are compatibility and reliability. Although We can >>> change on-disk format if need, but I don't think it can be compatible >>> and reliable. If so, who wants to use it? I feel there is n

Re: [PATCH v6 4/7] fat: restructure export_operations

2013-02-18 Thread Namjae Jeon
2013/2/18 OGAWA Hirofumi : > Namjae Jeon writes: > >>>> + if (parent && (len < FAT_FID_SIZE_WITH_PARENT)) { >>>> + *lenp = FAT_FID_SIZE_WITH_PARENT; >>>> + return 255; >>>> + } else

Re: Read support for fat_fallocate()? (was [v2] fat: editions to support fat_fallocate())

2013-02-18 Thread Namjae Jeon
2013/2/18 OGAWA Hirofumi : > Andrew Bartlett writes: > >>> >> First, Thanks for your interest ! >>> >> A mismatch between inode size and reserved blocks can be either due to >>> >> pre-allocation (after our changes) or due to corruption (sudden unplug >>> >> of media etc). >>> >> We don’t think it

Re: [PATCH v6 4/7] fat: restructure export_operations

2013-02-18 Thread Namjae Jeon
2013/2/18 OGAWA Hirofumi : > OGAWA Hirofumi writes: > >>> +if (parent && (len < FAT_FID_SIZE_WITH_PARENT)) { >>> +*lenp = FAT_FID_SIZE_WITH_PARENT; >>> +return 255; >>> +} else if (len < FAT_FID_SIZE_WITHOUT_PARENT) { >>> +*lenp = FAT_FID_SIZE_WITHOUT_PA

Re: [PATCH v6 4/7] fat: restructure export_operations

2013-02-18 Thread Namjae Jeon
2013/2/18 OGAWA Hirofumi : > Namjae Jeon writes: > >> + if (MSDOS_SB(inode->i_sb)->options.nfs == FAT_NFS_NOSTALE_RO) { >> + if (inode->i_ino == MSDOS_ROOT_INO) >> + stat->ino = MSDOS_ROOT_INO; > > Can we simply set i_p

Re: [PATCH v6 7/7] Documentation: update nfs option in filesystem/vfat.txt

2013-02-18 Thread Namjae Jeon
2013/2/18 OGAWA Hirofumi : > Namjae Jeon writes: > >> -nfs -- This option maintains an index (cache) of directory >> - inodes by i_logstart which is used by the nfs-related code to >> - improve look-ups. >> +nfs= stale_rw|nostale_

[PATCH v2] fs: encode_fh: return FILEID_INVALID if invalid fid_type

2013-02-16 Thread Namjae Jeon
From: Namjae Jeon This patch is a follow up on below patch: [PATCH] exportfs: add FILEID_INVALID to indicate invalid fid_type commit: 216b6cbdcbd86b1db0754d58886b466ae31f5a63 Signed-off-by: Namjae Jeon Signed-off-by: Vivek Trivedi Acked-by: Steven Whitehouse Acked-by: Sage Weil --- fs

Re: Read support for fat_fallocate()? (was [v2] fat: editions to support fat_fallocate())

2013-02-14 Thread Namjae Jeon
[snip] >> > >> > Thanks, >> Hi Andrew. >> >> First, Thanks for your interest ! >> A mismatch between inode size and reserved blocks can be either due to >> pre-allocation (after our changes) or due to corruption (sudden unplug >> of media etc). >> We don’t think it is right to include only read onl

Re: Read support for fat_fallocate()? (was [v2] fat: editions to support fat_fallocate())

2013-02-13 Thread Namjae Jeon
2013/2/14, Andrew Bartlett : > (apologies for the duplicate mail, I typo-ed the maintainers address) > > G'day, > > I've been looking into the patch "[v2] fat: editions to support > fat_fallocate()" and I wonder if there is a way we can split this issue > in two, so that we get at least some of the

Re: [PATCH] fs: encode_fh: return FILEID_INVALID if invalid fid_type

2013-02-11 Thread Namjae Jeon
2013/2/12, Dave Chinner : > On Mon, Feb 11, 2013 at 05:25:58PM +0900, Namjae Jeon wrote: >> From: Namjae Jeon >> >> This patch is a follow up on below patch: >> >> [PATCH] exportfs: add FILEID_INVALID to indicate invalid fid_type >> commit: 216b6cbdcbd86b1d

[PATCH] fs: encode_fh: return FILEID_INVALID if invalid fid_type

2013-02-11 Thread Namjae Jeon
From: Namjae Jeon This patch is a follow up on below patch: [PATCH] exportfs: add FILEID_INVALID to indicate invalid fid_type commit: 216b6cbdcbd86b1db0754d58886b466ae31f5a63 Signed-off-by: Namjae Jeon Signed-off-by: Vivek Trivedi Acked-by: Steven Whitehouse --- fs/btrfs/export.c |4

[PATCH v6 7/7] Documentation: update nfs option in filesystem/vfat.txt

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon Add descriptions about 'stale_rw' and 'nostale_ro' nfs options in filesystem/vfat.txt Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N Signed-off-by: Amit Sahrawat --- Documentation/filesystems/vfat.txt | 26 +-

[PATCH v6 6/7] fat (exportfs): rebuild directory-inode if fat_dget() fails

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon This patch enables rebuilding of directory inodes which are not present in the cache.This is done by traversing the disk clusters to find the directory entry of the parent directory and using its i_pos to build the inode. The traversal is done by fat_scan_logstart() which is

[PATCH v6 5/7] fat (exportfs): rebuild inode if ilookup() fails

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon If the cache lookups fail,use the i_pos value to find the directory entry of the inode and rebuild the inode.Since this involves accessing the FAT media, do this only if the nostale_ro nfs mount option is specified. Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N

[PATCH v6 4/7] fat: restructure export_operations

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon Define two nfs export_operation structures,one for 'stale_rw' mounts and the other for 'nostale_ro'.The latter uses i_pos as a basis for encoding and decoding file handles. Also, assign i_pos to kstat->ino.The logic for rebuilding the inode is added in

[PATCH v6 2/7] fat: move fat_i_pos_read to fat.h

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon Move fat_i_pos_read to fat.h so that it can be called from nfs.c in the subsequent patches to encode the file handle. Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N Signed-off-by: Amit Sahrawat --- fs/fat/fat.h | 14 ++ fs/fat/inode.c | 14

[PATCH v6 3/7] fat: introduce a helper fat_get_blknr_offset()

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon Introduce helper function to get the block number and offset for a given i_pos value. Use it in __fat_write_inode() now and later on in nfs.c Signed-off-by: Namjae Jeon Signed-off-by: Ravishankar N Signed-off-by: Amit Sahrawat --- fs/fat/fat.h |7 +++ fs/fat

[PATCH v6 0/7] fat (exportfs): support stale_rw and nostale_ro mount options.

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon This patch set eliminates the client side ESTALE errors when a FAT partition exported over NFS has it's dentries evicted from the cache. The idea is to find the on-disk location_'i_pos' of the dirent of the inode that has been evicted and use it to rebuild the

[PATCH v6 1/7] fat: Introduce 2 new values for the -o nfs mount option

2013-02-09 Thread Namjae Jeon
From: Namjae Jeon Provide two possible values 'stale_rw' and 'nostale_ro' for the -o nfs mount option.The first one allows all file operations but does not reduce ESTALE errors on memory constrained systems. The second one eliminates ESTALE errors but mounts the filesyst

Re: [PATCH v2] fat: eliminate iterations in fat_search_long and __fat_readdir in case of EOD

2013-02-08 Thread Namjae Jeon
2013/2/8, OGAWA Hirofumi : > Namjae Jeon writes: > >>> And did this work correctly about f_pos for readdir? >> Yes, sure. f_pos is work correctly about each directory entry. because >> after name[0] == 0x00, there are no allocated directory entires. >>> >

Re: [PATCH v2] fat: eliminate iterations in fat_search_long and __fat_readdir in case of EOD

2013-02-07 Thread Namjae Jeon
2013/2/7, OGAWA Hirofumi : > Namjae Jeon writes: > >> From: Namjae Jeon >> >> When doing lookups via fat_search_long(), we can stop checking for >> further entries if we detect End of Directory, i.e. if (de->name[0] == >> 0x00).The current code traverses t

[LSF/MM TOPIC] f2fs: Dynamic Control of GC Thread at User Level and Stabilizing sudden eject behavior for SD Cards.

2013-02-05 Thread Namjae Jeon
Hello. I am considering the following subjects on f2fs. I'm not sure if it is proper TOPIC. Let me know opinions :) 1. Dynamic Control of GC Thread at User Level. To cope with rapid increase in number of smart phone users and increasing demands for different media application with Quality Of Serv

Re: [PATCH] f2fs: fix to name f2fs GC task as per partition instead of per device

2013-02-05 Thread Namjae Jeon
2013/2/6, Jaegeuk Kim : > Hi, > > How about this? > > 2013-02-05 (화), 23:24 +0900, Namjae Jeon: >> From: Namjae Jeon >> >> After the commit 2184ad190a79ae2b40b5f5db1fbde5c22db6d310, it allowed >> for naming GC threads based on the device. >> i.e., if

[PATCH] f2fs: fix to name f2fs GC task as per partition instead of per device

2013-02-05 Thread Namjae Jeon
From: Namjae Jeon After the commit 2184ad190a79ae2b40b5f5db1fbde5c22db6d310, it allowed for naming GC threads based on the device. i.e., if we have F2FS formatted partition in different devices - we will have their GC thread names after the device. But, when we have a case like 2 or more

Re: [PATCH] f2fs: add compat_ioctl to provide backward compatability

2013-02-04 Thread Namjae Jeon
2013/2/5, Namjae Jeon : > 2013/2/5, Jaegeuk Kim : >> Hi, >> >> 2013-02-05 (화), 14:28 +0900, Namjae Jeon: >>> Hi Jaegeuk. >>> >>> Oops!, I was missing include header. >>> Sorry, I will send v2 patch again. >> >> I got a bui

Re: [PATCH] f2fs: add compat_ioctl to provide backward compatability

2013-02-04 Thread Namjae Jeon
2013/2/5, Jaegeuk Kim : > Hi, > > 2013-02-05 (화), 14:28 +0900, Namjae Jeon: >> Hi Jaegeuk. >> >> Oops!, I was missing include header. >> Sorry, I will send v2 patch again. > > I got a build error, and simply added the following header file in your > p

Re: [PATCH] f2fs: add compat_ioctl to provide backward compatability

2013-02-04 Thread Namjae Jeon
Hi Jaegeuk. Oops!, I was missing include header. Sorry, I will send v2 patch again. Thanks. 2013/2/4, Namjae Jeon : > From: Namjae Jeon > > adding compat_ioctl to provide support for backward comptability - 32bit > binary > execution on 64bit kernel. > > Signed-off-by:

[PATCH v2] fat: eliminate iterations in fat_search_long and __fat_readdir in case of EOD

2013-02-04 Thread Namjae Jeon
From: Namjae Jeon When doing lookups via fat_search_long(), we can stop checking for further entries if we detect End of Directory, i.e. if (de->name[0] == 0x00).The current code traverses the cluster chain of a directory until a hit is found or till the last cluster for that directory, ignor

[PATCH] f2fs: add compat_ioctl to provide backward compatability

2013-02-04 Thread Namjae Jeon
From: Namjae Jeon adding compat_ioctl to provide support for backward comptability - 32bit binary execution on 64bit kernel. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/f2fs.h | 15 +++ fs/f2fs/file.c | 20 2 files changed, 35

Re: [PATCH] udf: add extent cache support in case of file reading

2013-02-04 Thread Namjae Jeon
2013/2/4, Jan Kara : > On Sat 02-02-13 15:21:09, Namjae Jeon wrote: >> Hi. Jan. >> >> Sorry for interrupt. >> Have you taken this patch to your tree ? I can not find it.. >> or Is there any issue regarding this patch ? > I had it in my tree but not in th

Re: [PATCH 1/6] f2fs: optimize get node page readahead part

2013-02-03 Thread Namjae Jeon
2013/2/4, Jaegeuk Kim : > Hi, > > 2013-02-02 (토), 23:51 +0900, Namjae Jeon: >> From: Namjae Jeon >> >> We can remove the call to find_get_page to get a page from the cache >> and check for up-to-date, instead we can make use of grab_cache_page >> part

Re: [PATCH 2/6] f2fs: move out f2fs_balance_fs from gc_thread_func

2013-02-03 Thread Namjae Jeon
on check and balance_fs > > 1. If f2fs is mounted with background_gc_off option, checking > BG_GC is not redundant. > 2. f2fs_balance_fs is checked in f2fs_gc, so this is also redundant. > > Signed-off-by: Changman Lee > Signed-off-by: Namjae Jeon > Signed-off-by: Ami

[PATCH 5/6] f2fs: make accessor to get sections for particular block type

2013-02-02 Thread Namjae Jeon
From: Namjae Jeon Introduce accessor to get the sections based upon the block type (node,dents...) and modify the functions : should_do_checkpoint, has_not_enough_free_secs to use this accessor function to get the node sections and dent sections. Signed-off-by: Namjae Jeon Signed-off-by: Amit

[PATCH 6/6] f2fs: optimize the return condition for has_not_enough_free_secs

2013-02-02 Thread Namjae Jeon
From: Namjae Jeon Instead of evaluating the free_sections and then deciding to return true/false from that path. We can directly use the evaluation condition for returning proper value. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/segment.h |6 ++ 1 file

[PATCH 3/6] f2fs: name gc task as per the block device

2013-02-02 Thread Namjae Jeon
From: Namjae Jeon Currently GC task is started for each f2fs formatted/mounted device. But, when we check the task list, using 'ps', there is no distinguishing factor between the tasks. So, name the task as per the block device just like the flusher threads. Also, remove the macro GC_T

[PATCH 4/6] f2fs: mark gc_thread as NULL when thread creation failed

2013-02-02 Thread Namjae Jeon
From: Namjae Jeon When gc thread creatio failed, mark gc_thread as NULL to avoid crash while trying to stop invalid thread in stop_gc_thread->kthread_stop. Instead make it return from: if (!gc_th) return; Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/g

[PATCH 2/6] f2fs: move out f2fs_balance_fs from gc_thread_func

2013-02-02 Thread Namjae Jeon
From: Namjae Jeon When GC thread is running continously there is no need to call f2fs_balance_fs unconditinally for garbage collection, instead the garbage collection will be taken via. calling f2fs_gc in the thread. So, we can move out the balance out of thread loop and make it run initially

[PATCH 1/6] f2fs: optimize get node page readahead part

2013-02-02 Thread Namjae Jeon
From: Namjae Jeon We can remove the call to find_get_page to get a page from the cache and check for up-to-date, instead we can make use of grab_cache_page part itself to fetch the page from the cache. So, removing the call and moving the PageUptodate at proper place, also taken care of moving

Re: [PATCH] udf: add extent cache support in case of file reading

2013-02-01 Thread Namjae Jeon
Hi. Jan. Sorry for interrupt. Have you taken this patch to your tree ? I can not find it.. or Is there any issue regarding this patch ? Thanks! 2013/1/22, Namjae Jeon : > 2013/1/22, Jan Kara : >> On Tue 22-01-13 09:45:09, Namjae Jeon wrote: >>> 2013/1/21, Jan Kara : >&g

Re: [PATCH 1/3] f2fs: avoid redundant call to has_not_enough_free_secs in f2fs_gc

2013-01-30 Thread Namjae Jeon
2013/1/31, Jaegeuk Kim : > 2013-01-30 (수), 22:47 +0900, Namjae Jeon: >> From: Namjae Jeon >> >> After doing a write_checkpoint from garbage collection path if there is >> still >> need to do more garbage collection, gc_more label is used to jump and >>

[PATCH 3/3] f2fs: fix typo mistake for data_version description

2013-01-30 Thread Namjae Jeon
From: Namjae Jeon In f2fs_inode_info structure, the description for data_version has a typo mistake. It should be latest instead of lastes. So, correcting that. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/f2fs.h |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/3] f2fs: reorganize code for ra_node_page

2013-01-30 Thread Namjae Jeon
From: Namjae Jeon We can remove unneeded label unlock_out, avoid unnecessary jump and reorganize the returning conditions in this function. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/node.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH 1/3] f2fs: avoid redundant call to has_not_enough_free_secs in f2fs_gc

2013-01-30 Thread Namjae Jeon
From: Namjae Jeon After doing a write_checkpoint from garbage collection path if there is still need to do more garbage collection, gc_more label is used to jump and start the process again. And in that process, first step before getting victim is to check if there are not enough free sections

Re: [PATCH v5 7/8] fat (exportfs): rebuild directory-inode if fat_dget() fails

2013-01-28 Thread Namjae Jeon
2013/1/28, OGAWA Hirofumi : > Namjae Jeon writes: > >>>> Although checking several routines to check hang case you said, I >>>> didn't find anything. >>>> And There is no any race on test result also. Am I missing something ? >>>> Let

Re: [PATCH v5 7/8] fat (exportfs): rebuild directory-inode if fat_dget() fails

2013-01-27 Thread Namjae Jeon
2013/1/26, OGAWA Hirofumi : > Namjae Jeon writes: > >> 2013/1/20, OGAWA Hirofumi : >>> Namjae Jeon writes: >>> >>>> We rewrite patch as your suggestion using dummy inode. Would please >>>> you review below patch code ? >>> >>

Re: [PATCH] udf: add extent cache support in case of file reading

2013-01-22 Thread Namjae Jeon
2013/1/22, Jan Kara : > On Tue 22-01-13 09:45:09, Namjae Jeon wrote: >> 2013/1/21, Jan Kara : >> > @@ -,6 +2219,8 @@ int udf_read_extent_cache(struct inode *inode, >> > loff_t >> > bcount, >> >*lbcount = iinfo->cached_e

Re: [PATCH v5 7/8] fat (exportfs): rebuild directory-inode if fat_dget() fails

2013-01-22 Thread Namjae Jeon
2013/1/20, OGAWA Hirofumi : > Namjae Jeon writes: > >> We rewrite patch as your suggestion using dummy inode. Would please >> you review below patch code ? > > Looks like good as initial. Clean and shorter. > > Next is, we have to think about race. I.e. if real inod

Re: [PATCH] udf: add extent cache support in case of file reading

2013-01-21 Thread Namjae Jeon
2013/1/21, Jan Kara : > On Sat 19-01-13 11:17:14, Namjae Jeon wrote: >> From: Namjae Jeon >> >> This patch implements extent caching in case of file reading. >> While reading a file, currently, UDF reads metadata serially >> which takes a lot of time depending

Re: [patch] f2fs: use _safe() version of list_for_each

2013-01-21 Thread Namjae Jeon
2013/1/21, Dan Carpenter : > I sometimes write little user space programs to help me check my > work. I've attached one. > > gcc test.c > ./a.out > > regards, > dan carpenter > Hi Dan. Thanks for testcase. I understand fully. list_for_each still use pos after removing pos in loop. So, we need to u

Re: [patch] f2fs: use _safe() version of list_for_each

2013-01-21 Thread Namjae Jeon
2013/1/21, Jaegeuk Kim : > 2013-01-21 (월), 00:32 -0800, Dmitry Torokhov: >> On Sun, Jan 20, 2013 at 06:02:58PM +0300, Dan Carpenter wrote: >> > This is calling list_del() inside a loop which is a problem when we try >> > move to the next item on the list. I've converted it to use the _safe >> > ve

Re: [PATCH] fat: eliminate iterations in fat_search_long in case of EOD

2013-01-20 Thread Namjae Jeon
2013/1/21, OGAWA Hirofumi : > Namjae Jeon writes: > >> 2013/1/20, OGAWA Hirofumi : >>> Namjae Jeon writes: >>> >>>> From: Namjae Jeon >>>> >>>> When searching a directory for names, we can stop checking for further >>>

Re: [PATCH] fat: eliminate iterations in fat_search_long in case of EOD

2013-01-20 Thread Namjae Jeon
2013/1/20, OGAWA Hirofumi : > Namjae Jeon writes: > >> From: Namjae Jeon >> >> When searching a directory for names, we can stop checking for further >> entries if we detect End of Directory, i.e. if (de->name[0] == 0x00).The >> current code traverses the c

Re: [PATCH] udf: add extent cache support in case of file reading

2013-01-20 Thread Namjae Jeon
2013/1/19, Cong Ding : > On Sat, Jan 19, 2013 at 11:17:14AM +0900, Namjae Jeon wrote: >> From: Namjae Jeon >> >> This patch implements extent caching in case of file reading. >> While reading a file, currently, UDF reads metadata serially >> which takes a lot o

Re: [patch] f2fs: use _safe() version of list_for_each

2013-01-20 Thread Namjae Jeon
2013/1/21, Dan Carpenter : > This is calling list_del() inside a loop which is a problem when we try > move to the next item on the list. I've converted it to use the _safe > version. And also, as a cleanup, I've converted it to use > list_for_each_entry instead of list_for_each. > Hi Dan. I can'

[PATCH] fat: eliminate iterations in fat_search_long in case of EOD

2013-01-18 Thread Namjae Jeon
From: Namjae Jeon When searching a directory for names, we can stop checking for further entries if we detect End of Directory, i.e. if (de->name[0] == 0x00).The current code traverses the cluster chain of a directory until a hit is found or till the last cluster for that directory, ignoring

<    2   3   4   5   6   7   8   9   10   >