Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-06 Thread Namjae Jeon
2012/12/6, OGAWA Hirofumi : > Namjae Jeon writes: > >>> I know encode_fh(). But NFS is network protocol, and network can input >>> any data, and I guess the userland interface (open_by_handle()?) can be >>> any too. >>> >>> And generic_fh_to_dentry()'s input verify choose to check the minimum >>>

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-06 Thread OGAWA Hirofumi
Namjae Jeon writes: >> I know encode_fh(). But NFS is network protocol, and network can input >> any data, and I guess the userland interface (open_by_handle()?) can be >> any too. >> >> And generic_fh_to_dentry()'s input verify choose to check the minimum >> length only. But your logic choose th

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-05 Thread Namjae Jeon
2012/12/5, OGAWA Hirofumi : > Namjae Jeon writes: > >>> I can understand what is doing. I'm asking why there is difference. >>> >>> 1) generic_fh_to_dentry() allows (*_PARENT && fh_len == 2). >>> 2) fat_fh_to_dentry_nostale() doesn't allows (*_PARENT && fh_len == 3). >>> >>> Why does logic has dif

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-05 Thread OGAWA Hirofumi
Namjae Jeon writes: >> I can understand what is doing. I'm asking why there is difference. >> >> 1) generic_fh_to_dentry() allows (*_PARENT && fh_len == 2). >> 2) fat_fh_to_dentry_nostale() doesn't allows (*_PARENT && fh_len == 3). >> >> Why does logic has difference? > > When we consider the gen

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-05 Thread Namjae Jeon
2012/12/5, OGAWA Hirofumi : > Namjae Jeon writes: > Let me think, if ‘subtree’ checking is enabled then we should check the length condition over here also? Please share if there are any other comments also. >>> >>> I'm not sure what did you mean. Where is "subtree" check you are >>

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-05 Thread OGAWA Hirofumi
Namjae Jeon writes: >>> Let me think, if ‘subtree’ checking is enabled then we should check >>> the length condition over here also? Please share if there are any >>> other comments also. >> >> I'm not sure what did you mean. Where is "subtree" check you are >> talking? This is fh_to_dentry(), so

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-04 Thread Namjae Jeon
2012/12/4, OGAWA Hirofumi : > Namjae Jeon writes: > +static struct dentry *fat_fh_to_dentry_nostale(struct super_block *sb, + struct fid *fh, int fh_len, + int fh_type) +{ + struct inode *inod

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-04 Thread OGAWA Hirofumi
Namjae Jeon writes: >>> +static struct dentry *fat_fh_to_dentry_nostale(struct super_block *sb, >>> + struct fid *fh, int fh_len, >>> + int fh_type) >>> +{ >>> + struct inode *inode = NULL; >>> + struct fat_fid

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-03 Thread Namjae Jeon
2012/12/3, OGAWA Hirofumi : > Namjae Jeon writes: > >> +if (MSDOS_SB(inode->i_sb)->options.nfs == FAT_NFS_NOSTALE_RO) { >> +/* Use i_pos for ino. This is used as fileid of nfs. */ >> +stat->ino = fat_i_pos_read(MSDOS_SB(inode->i_sb), inode); > > BTW, what number is used

Re: [PATCH v5 5/8] fat: restructure export_operations

2012-12-03 Thread OGAWA Hirofumi
Namjae Jeon writes: > + if (MSDOS_SB(inode->i_sb)->options.nfs == FAT_NFS_NOSTALE_RO) { > + /* Use i_pos for ino. This is used as fileid of nfs. */ > + stat->ino = fat_i_pos_read(MSDOS_SB(inode->i_sb), inode); BTW, what number is used for root dir? If it is 0 (0 is sp

[PATCH v5 5/8] fat: restructure export_operations

2012-11-21 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 the subsequent patches.