Skip to content

Commit 3ab73c0

Browse files
authored
Fix btrfs lingering mounts
Btrfs has an issue where mount can linger after a sudden device disconnect, this is very apparent with USB storage. the psuedo mount option x-systemd.device-bound overrides the default `Requires` dependency to that of `BindsTo` which will automatically stop the mount if the device became inactive. Partly fixes storaged-project#1359 Please list more filesystems susceptible to lingering mounts in storaged-project#1359 so they can be covered as well.
1 parent 874b4f0 commit 3ab73c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data/builtin_mount_options.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ udf_allow=uid=$UID,gid=$GID,iocharset,utf8,umask,mode,dmode,unhide,undelete
2929
hfsplus_defaults=uid=$UID,gid=$GID,nls=utf8
3030
hfsplus_allow=uid=$UID,gid=$GID,creator,type,umask,session,part,decompose,nodecompose,force,nls
3131

32-
btrfs_allow=compress,compress-force,datacow,nodatacow,datasum,nodatasum,autodefrag,noautodefrag,degraded,device,discard,nodiscard,subvol,subvolid,space_cache
32+
btrfs_allow=compress,compress-force,datacow,nodatacow,datasum,nodatasum,autodefrag,noautodefrag,degraded,device,discard,nodiscard,subvol,subvolid,space_cache,x-systemd.device-bound
33+
btrfs_defaults=x-systemd.device-bound
3334

3435
f2fs_allow=discard,nodiscard,compress_algorithm,compress_log_size,compress_extension,compress_chksum,alloc_mode,atgc,gc_merge,nogc_merge
3536

0 commit comments

Comments
 (0)