Re: [Review] Fixes to the VFS layer

看板DFBSD_submit作者時間14年前 (2011/10/22 18:03), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/5 (看更多)
Francois Tigeot wrote: > Alex Hornung wrote: >> >> as I said previously on IRC I disagree with this approach to statfs and >> hence to your first two patches. You should be using the statfs entry >> point and not inspect the statfs structure in the mount point. >> >> For that, you need to simply fix the right thing, which would be the >> VOP_STATFS entry of nullfs and make it populate the fields you need as >> you expect. > > To be honest, I had forgotten about this conversation; I'll try to > replace the direct struct mount accesses by the use of VOP_STATFS. I'm focusing on the first patch for now, the one which initializes mp->mnt_stat.f_mntonname from nullfs_mount() >> That the stat field in the mount point is not populated as you would >> like it is *not* a bug and doesn't really need fixing, you should be >> using the right approach instead, one that is using the API instead of >> raw accesses. Guess where VOP_STATFS takes the values it returns ? From mp->mnt_stat : http://opengrok.wolfpond.org/source/xref/sys/vfs/nullfs/null_vfsops.c#nullfs_statfs nullfs_statfs is a very simple function; it only copies existing values. The initial name of the mount point can only be known from the nullfs_mount function; if this patch is not applied, VOP_STATFS will never be able to return the correct values. I'm afraid patch-0008 has to be applied. -- Francois Tigeot
文章代碼(AID): #1EefK9zg (DFBSD_submit)
文章代碼(AID): #1EefK9zg (DFBSD_submit)