Re: [PATCH md 3 of 4] Delete unplug timer before shutting down md array.

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

 



On Mon, Nov 01, 2004 at 09:33:33PM -0800, Andrew Morton wrote:
md has the misfortune of working in a way that doesn't fit very well
with some aspects of the blkdev layer.

To create an md array, you open /dev/mdX, and use some ioctls to set
up the array.  Thus the block device must exist internally as a block
device before any details about it are available.

Similarly, to shut down an array, you open /dev/mdX and use an ioctl
to shut it down.  This it will still be open (though only once) after
it has been shut down.

(as I understand it) I can only safely use blk_cleanup_queue on the
queue after (or during) the last close.  Thus I cannot use it while
shutting down an array.
However I need to release the md personality as part of shutting down
the array, so I have to disable the unplug function (which is handled
by the personality).

I could change ->unplug_fn to point to something safe, but there is
still a race with the timer going off at just the wrong time.

hm, OK. So perhaps using /dev/mdX as a control channel for creating and destroying /dev/mdX was unfortunate design. Ho hum.

would it be unfeasible to create a custom (misc) character device, say /dev/mdadm and use that to control arrays instead of /dev/md0?

Regards,
L.

--
Luca Berra -- bluca@xxxxxxxxxx
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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