Re: [ANNOUNCE][PATCH 2.6] md: persistent (file-backed) bitmap and async writes

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

 



Neil Brown wrote:
 
> > > - A question - can the bitmap be "rescaled" online, or only offline?
> > >   (not that I particularly want on-line rescaling) How is it achieved?
> >
> > The bitmap file can be rescaled offline by simply expanding or
> > collapsing the bits as necessary, and then writing the enlarged or
> > shrunken bitmap file. When the array is started (with a new bitmap chunk
> > size), everything will work correctly. (The bitmap file can also be
> > truncated, in which case the driver will assume all the bits to be dirty
> > and perform a full resync).
> >
> 
> It would seem to make sense to store the "chunk size" in the bitmap
> file.
> In fact, if the bitmap file had a small header containing:
>     magic number
>     array uuid
>     event count
>     bitmap chunk size
> Then you could rescale the bitmap without touching the superblock and
> would at the same time solve the problem with possibly getting an
> out-of-date bitmap.

That sounds good, as it would lend some more foolproofing to the bitmap
file operations. The only problem being that we wouldn't be able to
support bitmaps without backing files (in-memory only bitmaps). I guess
if we don't think that's a useful feature we could do this. 

We could also add this bitmap file superblock as a follow-on patch. The
code that reads in the bitmap file would simply look for the magic
string in the superblock to determine if the bitmap file is a flat file
(old style) or contains a superblock (new style).

--
Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
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