File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1149,6 +1149,7 @@ typedef struct ddt_histogram {
1149
1149
#define ZFS_SHARETAB "/etc/dfs/sharetab"
1150
1150
1151
1151
#define ZFS_SUPER_MAGIC 0x2fc12fc1
1152
+ #define ZFS_SHACK_MAGIC 0x13372fc1
1152
1153
1153
1154
/* general zvol path */
1154
1155
#define ZVOL_DIR "/dev"
Original file line number Diff line number Diff line change @@ -1457,6 +1457,7 @@ zfs_statvfs(struct dentry *dentry, struct kstatfs *statp)
1457
1457
zfsvfs_t * zfsvfs = dentry -> d_sb -> s_fs_info ;
1458
1458
uint64_t refdbytes , availbytes , usedobjs , availobjs ;
1459
1459
int err = 0 ;
1460
+ bool magic_hack = false;
1460
1461
1461
1462
ZFS_ENTER (zfsvfs );
1462
1463
@@ -1504,6 +1505,17 @@ zfs_statvfs(struct dentry *dentry, struct kstatfs *statp)
1504
1505
statp -> f_type = ZFS_SUPER_MAGIC ;
1505
1506
statp -> f_namelen = MAXNAMELEN - 1 ;
1506
1507
1508
+ if (strcmp (current -> comm , "containerd" ) == 0 )
1509
+ magic_hack = true;
1510
+ if (strcmp (current -> comm , "dockerd" ) == 0 )
1511
+ magic_hack = true;
1512
+ if (strcmp (current -> comm , "lxd" ) == 0 )
1513
+ magic_hack = true;
1514
+ if (magic_hack ) {
1515
+ printk (KERN_WARNING "ZFS magic faked to %s\n" , current -> comm );
1516
+ statp -> f_type = ZFS_SHACK_MAGIC ;
1517
+ }
1518
+
1507
1519
/*
1508
1520
* We have all of 40 characters to stuff a string here.
1509
1521
* Is there anything useful we could/should provide?
You can’t perform that action at this time.
0 commit comments