[systemd-devel] [PATCH] fstab-generator: Honor usr=, usrfstype= and usrflags=
Tobias Hunger
tobias.hunger at gmail.com
Fri Oct 3 07:47:57 PDT 2014
On Thu, Oct 2, 2014 at 3:15 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Wed, 24.09.14 22:08, Tobias Hunger (tobias.hunger at gmail.com) wrote:
>
> The patch is line-broken, please resend non-linebroken version!
I'll fix that, sorry.
>>
>> +static int add_usr_mount(void) {
>> + _cleanup_free_ char *what = NULL;
>> + const char *opts;
>> +
>> + if (!arg_usr_what && !arg_usr_fstype && !arg_usr_options)
>> + return 0;
>> +
>> + if (arg_root_what && !arg_usr_what)
>> + arg_usr_what = strdup(arg_root_what);
>
> Hmm, what's the rationale here? I mean, then we'd mount the same stuff
> to /usr that we already mount to / if one field is missing, is that
> really disarable? Maybe better do a warning instead?
This patch should make it easy to mount the root:something and
usr:something subvolumes you had proposed earlier. "/" and "/usr" both
are separate in that proposal, but expected to be subvolumes of the
same BTRFS partition. So to keep the kernel commandline short, I just
went ahead and copied the missing arg_usr_* from the corresponding
arg_root_*.
Usually arg_usr_what and arg_usr_fstype will be unset and only
arg_usr_options will point to the usr:whatever subvolume on the same
BTRFS partition that is also used for "/".
I see no reason not enforce this by removing the other options, though.
<snip>
> Otherwise looks good to me, but I'd really like Harald Hoyer's
> feedback on this, before we merge this.
Great:-) My C-foo is seriously rusted.
> I am not entirely sure what our strategy here is precisely, and I think
> dracut might already have something here.
I did not see anything, but having something in systemd would be nice
for distros not using dracut -- like the archlinux I am on.
Best Regards,
Tobias
More information about the systemd-devel
mailing list