Re: xfs_repair: add '-F' option to ignore writable mount checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello Eric Sandeen and Dave Chinner,

Could you kindly help me to review this patch? This time, the xfs_repair block problem is fixed,
and xfs_repair/xfs_copy's behaviors are the same as before.

# mount | grep fuse
ceph-fuse on /mnt/registry type fuse.ceph-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)

stat('ceph-fuse') will return error, and the mountpoint scanning loop will continue, other than blocked on stat("/mnt/registry").

thx,

Yang Honggang

On 03/01/2018 10:31 AM, Yang Joseph wrote:

hello,

My last reply is rejected, so I resend this email.

A new suggestion:

From: Yang Honggang <joseph.yang@xxxxxxxxxxxx>

stat(/path/to/device) instead of stat(mountpoint) to prevent
platform_check_mount() from hanging on stat() systemcall
when a dead fuse mountpoint is encountered. Because this
kind of mountpoint has no local device, only 'ceph-fuse',
stat('ceph-fuse') will return error, and the while loop will
continue.

Signed-off-by: Yang Honggang <joseph.yang@xxxxxxxxxxxx>
---
 libxfs/linux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libxfs/linux.c b/libxfs/linux.c
index 0bace3e..d415c33 100644
--- a/libxfs/linux.c
+++ b/libxfs/linux.c
@@ -78,9 +78,9 @@ platform_check_mount(char *name, char *block, struct stat *s, int flags)
         return 1;
     }
     while ((mnt = getmntent(f)) != NULL) {
-        if (stat(mnt->mnt_dir, &mst) < 0)
+        if (stat(mnt->mnt_fsname, &mst) < 0)
             continue;
-        if (mst.st_dev != s->st_rdev)
+        if (mst.st_rdev != s->st_rdev)
             continue;
         /* Found our device, is RO OK? */
         if ((flags & CHECK_MOUNT_WRITABLE) && hasmntopt(mnt, MNTOPT_RO))

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux