Ivan Vilata i Balaguer (2022-12-14 10:43:46 +0100) wrote:

> Since it's unlikely that the file will change its block arrangement on disk,
> and enlarging it requires another invocation of `mkswap`, it's probably enough
> to tell the user to check for such warnings on `mkswap` invocation (in section
> "(guix)Keyboard Layout, Networking, and Partitioning"), and then instructing
> them to use `filefrag` in "(guix)Swap Space" should be ok.
> 
> I can work on an additional patch for that, but I can't ensure that it'll be
> ready before 1.4.0 (I'm not in the dev team, so I don't know what the planning
> for the release isย ๐Ÿ˜‰).

Ooops, too late anyway for 1.4.0 (congrats for the dev team BTW)!ย ๐Ÿ˜

I sent an alternative, more elaborated patch to #59746.  Some notes:

- Both `mkswap` and `swapon` complain about swap files with holes, so I deemed
  it redundant to add notes about that (and besides, it should be rare enough
  when using the `dd`-based creation technique).

- `filefrag` does work on non-Ext2 filesystems (by falling back to an older
  ioctl), one just needs to force the extents output (`-e`) and run it as root
  in case the newer ioctl fails.  I used that in the swap file example.

- Yeah, there's a specific swap file example now with instructions on how to
  get the offset with `filefrag`.

I hope that the new patch is more complete and straightforward than the
previous one.

Thanks everyone for the extra info, cheers!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/

Attachment: signature.asc
Description: PGP signature

Reply via email to