On Wed, Jan 30, 2008 at 09:53:24PM +0100, Rasmus Rohde wrote:Thanks, I know some people have been waiting for this for quite a while. Please make sure Jan Kara who's the new udf maintainer and linux-fsdevel where we discuss general filesystem related issue for future revisions of the patch. isofs might not be the very best example since it's an odd filesystem, but then so is udf. I'll go through your patch in a little more detail below, but it looks quite reasonable. Any reason this is not called udf_get_parent to follow the scheme in most filesystems? This if/else block looks little odd, and following the locking is a bit hard. What about doing it like the following: lock_kernel(); if (!udf_find_entry(child->d_inode, &dotdot, &fibh, &cfi)) goto out_unlock; if (fibh.sbh != fibh.ebh) brelse(fibh.ebh); brelse(fibh.sbh); inode = udf_iget(child->d_inode->i_sb, lelb_to_cpu(cfi.icb.extLocation)); if (!inode) goto out_unlock; unlock_kernel(); parent = d_alloc_anon(inode); if (!parent) { iput(inode); parent = ERR_PTR(-ENOMEM); } return parent; out_unlock: unlock_kernel(); return ERR_PTR(-EACCESS); } to follow other filesystems this should be called udf_nfs_get_inode. Also please decide if you want to put the static and return type on the same line or on a separate one. Having it on the same one is documented in Documentation/Codingstyle but separate ones are acceptable aswell. Just make sure to stick to either one :) it would be better to introduce a version of udf_iget that can check the generation and return an error instead of having to check this later. If you don't think you're up to modifying code we could do this later on, though. In this case please note this in the patch description and fix up the above formatting to read something like: if (is_bad_inode(inode) || (generation && inode->i_generation != generation)) { It would be useful if you could add symbolic constants for the two fh types you add and chose values not yet used by other filesystems, e.g. 0x51 and 0x52. This will help people sniffing the nfs on the wire protocol to understand what file handle they're dealing with. Also you migh want to make the fh_len check more explicit and check that it's either 3 or 5 which is the only fhs you actually generate. and a check for len == 5 here. and you can remove these checks as you only end up here with len == 5 fhs. Also it would be nice if you could add your fid type to the union in include/linux/exportfs.h and use the union member. The symbolic names for the FH types should go into enum fid_type with a short comment describing them. Thanks for all this work! - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 007/196] Chinese: add translation of stable_kernel_rules.txt |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| Alexey Dobriyan | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [BUG] New Kernel Bugs |
