"Stephen C. Tweedie" wrote: > > Hi, > > On Wed, 12 May 1999 12:30:27 +0200, "Manfred Spraul" > said: > > > There is another problem with this line: > > set_blocksize() also means that the previous block size > > doesn't work anymore: > > if you accidentially enter 'swapon /dev/hda1' (my root drive) > > instead of 'swapon /dev/hda3', then you have to fsck: > > Yep, it would make perfect sense to move the set_blocksize to be after > the EBUSY check. Unfortunately that doesn't solve the problem: The current EBUSY check checks that the partition is not used as a swap partition, it doesn't check the VFS, and it doesn't check whether the RAID driver uses the volume. I've attached an old patch (vs.2.2.6): I've send that patch to linux-kernel@vger, Alan (..wait until Linus returns from vacation..), Linus (no reply). The patch adds a bitmap to the block cache for EBUSY checks. Actually, we can use this bitmap for other bits if we use devfs and dynamic MAJOR/MINOR codes: we must replace all 'MAJOR==LOOP', 'MAJOR==IDE' etc. if we want to support dynamic block device MAJOR/MINOR's. Additionally, we save 6-8 kB kernel memory. (ro_bits was an 8 kB static array). If you think that the patch is usefull, then I'll make a new patch vs 2.3.0, otherwise I'll wait until devfs is added, and I'll try to write a larger patch (dynamic MAJOR/MINOR for block cache) that includes this one. -- Manfred