]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r238980:
authoravatar <avatar@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 7 Oct 2015 09:39:45 +0000 (09:39 +0000)
committeravatar <avatar@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 7 Oct 2015 09:39:45 +0000 (09:39 +0000)
commit599a528ae78907e2f007880e12e4ff6c08428134
tree2513d8bc60beede3892588062dd068e1c8e2abc0
parent40041f3610014bc88489a7f26c2452c460a89e10
MFC r238980:

  Just like the other file systems found in /sys/fs, g_vfs_open()
should be paried with g_vfs_close().  Though g_vfs_close() is a wrapper
around g_wither_geom_close(), r206130 added the following test in
g_vfs_open():

if (bo->bo_private != vp)
return (EBUSY);

  Which will cause a 'Device busy' error inside reiserfs_mountfs() if
the same file system is re-mounted again after umount or mounting failure:

(case 1, /dev/ad4s3 is not a valid REISERFS partition)
# mount -t reiserfs -o ro /dev/ad4s3 /mnt
mount: /dev/ad4s3: Invalid argument
# mount -t msdosfs -o ro /dev/ad4s3 /mnt
mount: /dev/ad4s3: Device busy

(case 2, /dev/ad4s3 is a valid REISERFS partition)
# mount -t reiserfs -o ro /dev/ad4s3 /mnt
# umount /mnt
# mount -t reiserfs -o ro /dev/ad4s3 /mnt
mount: /dev/ad4s3: Device busy

  On the other hand, g_vfs_close() 'fixed' the above cases by doing an
extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers
synchronised.

Reviewed by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/8@288987 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/gnu/fs/reiserfs/reiserfs_vfsops.c