Re: [PATCH 13/14] lib/ismounted: detect loopback mounts

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

 



On Sun, Dec 16, 2012 at 10:44:01AM +0000, Sami Kerola wrote:
> While double checking the minix changes worked I noticed fsck.minix not
> to abort check if the file system was mounted using loopback device.  The
> commands before this commit which one needs to reproduce the issue are:
> 
> dd if=/dev/zero count=100 of=minixfs
> ./mkfs.minix ./minixfs
> mkdir x
> ./mount ./minixfs x
> ./fsck.minix minixfs

 Nice catch, although I have doubts that this is expected way how use
 fsck ;-)

> Neither did that appear, nor the fsck check got to be aborted.  It seems
> the generic fsck, and mkswap had same problem as they rely on
> is_mounted().

 fsck(8) uses libmount and this use case (fsck <fs image>) is ignored
 there. Not sure if we want to support it... 
 
 (It's not so easy, because you can use --offset and --sizelimit in losetup, 
  and you need these information to (reliable) found connection between 
  the image and a filesystem. It's already implemented in libmount,
  but it seems like overkill for fsck. I'll think about it.... :-)

>  lib/Makemodule.am | 1 +
>  lib/ismounted.c   | 8 ++++++--
>  2 files changed, 7 insertions(+), 2 deletions(-)

 I have applied a little different solution. Thanks.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux