Re: [systemd-devel] systemd kills mdmon if it was started manually by user

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

 



On Mon, 7 Nov 2011 04:42:54 +0100 Kay Sievers <kay.sievers@xxxxxxxx> wrote:

> On Mon, Nov 7, 2011 at 03:52, NeilBrown <neilb@xxxxxxx> wrote:
> 
> > However there is an important piece missing.  When you remount,ro a
> > filesystem, the block device doesn't get told so it thinks it is still open
> > read/write.  So md cannot tell mdmon that the array is now read-only
> 
> That ro/rw flag is visible in /proc/self/mountinfo, shouldn't it be
> possible for mdmon to poll() that file and let the kernel wake stuff
> up when the ro/rw flag changes, like we do for the usual mount changes
> already?
> 
> Kay

The ro/rw flag for file systems is in /proc/self/mountinfo.

However I want the ro/rw flag for the block device.
A block device can be partitioned so it might have multiple filesystems on it.
and it might have swap too.
or a dm table or another md device or an open file descriptor or ....

Yes, I could maybe parse various different files and try to work out what is
going on.  But the kernel can easily *know* what is going on.

Making this work "perfectly" would require md dropping its write-access to
member devices when the last write-access to the top level device goes.  And
the same for dm and loop and .....

But just filesystems would go a long way to catching the common cases
correctly.

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux