On 09/29/2013 05:35 AM, Christoph Hellwig wrote:> On Sun, Sep 29, 2013 at 05:21:30AM -0700, Christoph Hellwig wrote: >>> Bruce - are you ok with moving the pnfs interface definitions to >>> include/linux/exportfs.h along with struct export_operations? >>> >>> In fact we can actually extend struct export_operations rather >>> than adding pnfs_export_operations... >> >> Yes, it probably should go into the export ops, although the actual >> method signatures might need to be made a litle less nfs-specific for >> that. > > I jsut took a brief look over the diff for the whole series in the git > tree and the old tree that still had block and exofs servers and have > revised my opinion a little bit: > > > - the should be a layout_type field in struct export_operations, > indicating that a filesystem support some sort of pnfs-like export. The pnfs protocol and people have plans to, allow a multi typed layouts from the same super-block. It is a per file attribute. It even allows a multi protocol access to the same file. The only flag should be the presence of the layout_get vector that should indicate support or lack of it. (In fact I would remove layout_type field completly it's place is only as an input to LO_GET and DEVICE_INFO) > - there should be a struct pnfs_operations, but it should be confined > to fs/nfsd: each layout can be a separate loadable module and gets > registered there. For the initial file layout that module is > self-contained, but for e.g. block or objects it would have > call into the filesystem through export_ops, although way lower level > than the NFS XDR level, e.g. for block there would be one of to get > the extent map, and one to allocate an extent. > No! This does not make any sense. What you say does not fit any model of any cluster filesystem today. - Again the FS can support any protocol. - Only the FS understand the structure and layout of the file access. Any other model is a specific implementation and breaks abstraction. The only true abstraction is the LO_GET LO_RETURN LO_COMMIT DEVICE_INFO and LO_CB_RECALL. anything else is making assumptions. There is a pnfs vector and it is at this abstraction level exactly. > This way we alsod avoid the dependcy on nfsd in the filesystems that the > cureent version introduces. There is no "dependency on nfsd in the filesystems" The only dependency the FS has is an import of some library routines at exportfs that take an abstract layout and device descriptions and encode them into an XDR buffer. But the FS knows nothing of the XDR and the NFSD is free to unload at any moment without forcing the FS to unload first or at all. This is actually tested, in fact I do this all the time when I want to start fresh and have NFSD close all resources on the FS. Nothing changed, the FS is independent and NFSD is dependent on the FS, but in an abstract way via an exports vector. Where did you see such dependency? > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > Cheers Boaz -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html