useradd: skip btrfs subvolume creation for system users#1619
useradd: skip btrfs subvolume creation for system users#1619silverhadch wants to merge 1 commit intoshadow-maint:masterfrom
Conversation
|
The code seems good to me. Do we need to document that BTRFS configuration is ignored for system users? Also, I think the commit message should document why we don't want BTRFS subvolumes for system users. |
Subvolumes for non intercative users are wasteful as they multiply metadata operations and generate unneccesary filesystem objects for operations, a system user who doesnt generate snapshot worthy data, wont use. But I dont think its worth documenting as this is simply sane design. This BTRFS Backend never mattered to system users as the BTRFS Backend orginally released only supported interactive subvol creation. There is no usage for subvols (aka wasting metadata) for system users with state home dirs. |
Please copy this into the commit message.
This is still useful information for someone like me that has never used BTRFS and doesn't know anything about it other than the fact that it's a file system. :) I'd like to have it at least in the commit message. I don't care too much about the manual page. |
efd0339 to
f9906f3
Compare
Done. Documented in the commit message. |
Gate subvolume creation on user_id >= UID_MIN to exclude system users regardless of their home path. System users do not benefit from BTRFS subvolumes. They hold no snapshot-worthy data and do not interact with the filesystem in ways that would justify the overhead. Subvolumes multiply metadata operations and create unnecessary filesystem objects for accounts that simply do not need them. The BTRFS backend originally required an explicit flag to opt in to subvolume creation, making interactive useradd invocations the only practical target. Skipping subvolume creation for system users is the appropriate default. Fixes: c1d36a8 (2019-05-04; "Add support for btrfs subvolumes for user homes") Signed-off-by: Hadi Chokr <hadichokr@icloud.com>
f9906f3 to
2176bd2
Compare
Gate subvolume creation on user_id >= UID_MIN to exclude system users regardless of their home path.
Fixes: c1d36a8 (2019-05-04; "Add support for btrfs subvolumes for user homes")