On Thursday 07 of July 2011 06:04:23 you wrote: 
> > This topic was once discussed with the title of "FIBMAP ioctl
> > missing".
> > 
> > fibmap internally uses bmap vfs method.  Adding the feature is not so
> > difficult, but it must not be used for overwriting data blocks because
> > nilfs everytime changes allocation of file blocks due to its COW
> > nature.  Garbage collection also blows up safety of such operation.
> > Unfortunately, swap file is actually doing it.
> > 
> > Does LILO use fibmap for read-only purpose ?
> > 
> > If so, we only need a method to deny direct block write by the swap
> > file.
> 
> That was not enough.  I guess LILO uses block mapping assuming it's
> pinned to the place.  It's not easy to implement within nilfs.

That's my understanding as well. LILO, upon `installation' (the `lilo' command) 
creates a static map of which blocks make up kernel file (and optionally 
initial ramdisk). Basically we'd have to ensure the kernel file blocks are 
never moved around, which'd increase complexity of NILFS2. Leaving 128MB /boot 
partition gets the job done at benign cost.

FWIW, I got fingers burned by grub's complexity a few times, so I stick to the 
simple LILO.

Btw., Ryusuke, you've mentioned that blocks being part of a snapshot are never 
moved  around, right? If that's the case, keeping kernel files on snapshot 
would be enough, but snapshots can be deleted (and subsequently GC'd) at any 
time.

We could hack around that in a somewhat standard way with `chattr +i 
/boot/vmlinuz-xxx', provided NILFS2 supported the `i' (immutable) attribute (as 
discussed in man chattr(1)), but again that's some complexity. Or +t which was 
meant to secure against tail-merging for use with LILO.


-- 
dexen deVries

[[[↓][→]]]

For example, if the first thing in the file is:
   <?kzy irefvba="1.0" rapbqvat="ebg13"?>
an XML parser will recognize that the document is stored in the traditional 
ROT13 encoding.

(( Joe English, http://www.flightlab.com/~joe/sgml/faq-not.txt ))
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to