[arch-releng] [PATCH 1/1] double file size with sparse blocks

Christian Hesse list at eworm.de
Sat Jan 11 06:35:03 EST 2014


Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar> on Fri, 2014/01/10 23:53:
> On 01/10/2014 11:47 PM, Gerardo Exequiel Pozzi wrote:
> > On 01/09/2014 05:49 AM, Christian Hesse wrote:
> >> Christian Hesse <list at eworm.de> on Mon, 2013/09/02 10:03:
> >>> From: Christian Hesse <mail at eworm.de>
> >>>
> >>> This allows to grow the filesystem after system boot up. We have no
> >>> additional cost as squashfs handles sparse files.
> >>> ---
> >>>  archiso/mkarchiso | 2 ++
> >>>  1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/archiso/mkarchiso b/archiso/mkarchiso
> >>> index 8f9ed42..563f624 100755
> >>> --- a/archiso/mkarchiso
> >>> +++ b/archiso/mkarchiso
> >>> @@ -364,6 +364,8 @@ _mkfs () {
> >>>      cp -aT "${_fs_src}/" "${work_dir}/mnt/${_src}/"
> >>>      _msg_info "Done!"
> >>>      _umount_fs "${work_dir}/mnt/${_src}"
> >>> +    # double size with sparse blocks, will allow to grow the filesystem
> >>> +    truncate -s$((_fs_size*2))M "${_fs_img}"
> >>>  }
> >>>  
> >>>  command_checksum () {
> >>
> >> Currently I am maintaining this in a local package for myself. Any
> >> chance to get this merged upstream?
> >>
> > 
> > No. This is a special case. If root-image.fs.sfs is copied to a
> > filesystems that does not support sparse files (FAT commonly for
> > USB-keys), this is waste of free space.
> > 
> 
> brb, ignore me!! truncate is on root-image.fs not root-images.fs.sfs :P
> 
> Yes, this can be safe by default and can be included for next release :)

Great, thanks!
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-releng/attachments/20140111/b3649fdf/attachment.asc>


More information about the arch-releng mailing list