super.c (98c7089c769048f941bd5c5285287f8fc301f8b1) | super.c (aea52e19dd2085617dd7d247afb76a90cf2ea40c) |
---|---|
1/* 2 * Copyright (C) 2007 Oracle. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 133 unchanged lines hidden (view full) --- 142 sb->s_id, function, line, errstr); 143 save_error_info(fs_info); 144 145 btrfs_handle_error(fs_info); 146} 147 148static void btrfs_put_super(struct super_block *sb) 149{ | 1/* 2 * Copyright (C) 2007 Oracle. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 133 unchanged lines hidden (view full) --- 142 sb->s_id, function, line, errstr); 143 save_error_info(fs_info); 144 145 btrfs_handle_error(fs_info); 146} 147 148static void btrfs_put_super(struct super_block *sb) 149{ |
150 struct btrfs_root *root = btrfs_sb(sb); 151 int ret; 152 153 ret = close_ctree(root); 154 free_fs_info(root->fs_info); 155 sb->s_fs_info = NULL; 156 157 (void)ret; /* FIXME: need to fix VFS to return error? */ | 150 (void)close_ctree(btrfs_sb(sb)); 151 /* FIXME: need to fix VFS to return error? */ 152 /* AV: return it _where_? ->put_super() can be triggered by any number 153 * of async events, up to and including delivery of SIGKILL to the 154 * last process that kept it busy. Or segfault in the aforementioned 155 * process... Whom would you report that to? 156 */ |
158} 159 160enum { 161 Opt_degraded, Opt_subvol, Opt_subvolid, Opt_device, Opt_nodatasum, 162 Opt_nodatacow, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, 163 Opt_nossd, Opt_ssd_spread, Opt_thread_pool, Opt_noacl, Opt_compress, 164 Opt_compress_type, Opt_compress_force, Opt_compress_force_type, 165 Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, --- 1052 unchanged lines hidden (view full) --- 1218 buf->f_fsid.val[1] = be32_to_cpu(fsid[1]) ^ be32_to_cpu(fsid[3]); 1219 /* Mask in the root object ID too, to disambiguate subvols */ 1220 buf->f_fsid.val[0] ^= BTRFS_I(dentry->d_inode)->root->objectid >> 32; 1221 buf->f_fsid.val[1] ^= BTRFS_I(dentry->d_inode)->root->objectid; 1222 1223 return 0; 1224} 1225 | 157} 158 159enum { 160 Opt_degraded, Opt_subvol, Opt_subvolid, Opt_device, Opt_nodatasum, 161 Opt_nodatacow, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, 162 Opt_nossd, Opt_ssd_spread, Opt_thread_pool, Opt_noacl, Opt_compress, 163 Opt_compress_type, Opt_compress_force, Opt_compress_force_type, 164 Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, --- 1052 unchanged lines hidden (view full) --- 1217 buf->f_fsid.val[1] = be32_to_cpu(fsid[1]) ^ be32_to_cpu(fsid[3]); 1218 /* Mask in the root object ID too, to disambiguate subvols */ 1219 buf->f_fsid.val[0] ^= BTRFS_I(dentry->d_inode)->root->objectid >> 32; 1220 buf->f_fsid.val[1] ^= BTRFS_I(dentry->d_inode)->root->objectid; 1221 1222 return 0; 1223} 1224 |
1225static void btrfs_kill_super(struct super_block *sb) 1226{ 1227 struct btrfs_fs_info *fs_info = NULL; 1228 if (sb->s_root) 1229 fs_info = btrfs_sb(sb)->fs_info; 1230 kill_anon_super(sb); 1231 if (fs_info) 1232 free_fs_info(fs_info); 1233} 1234 |
|
1226static struct file_system_type btrfs_fs_type = { 1227 .owner = THIS_MODULE, 1228 .name = "btrfs", 1229 .mount = btrfs_mount, | 1235static struct file_system_type btrfs_fs_type = { 1236 .owner = THIS_MODULE, 1237 .name = "btrfs", 1238 .mount = btrfs_mount, |
1230 .kill_sb = kill_anon_super, | 1239 .kill_sb = btrfs_kill_super, |
1231 .fs_flags = FS_REQUIRES_DEV, 1232}; 1233 1234/* 1235 * used by btrfsctl to scan devices when no FS is mounted 1236 */ 1237static long btrfs_control_ioctl(struct file *file, unsigned int cmd, 1238 unsigned long arg) --- 165 unchanged lines hidden --- | 1240 .fs_flags = FS_REQUIRES_DEV, 1241}; 1242 1243/* 1244 * used by btrfsctl to scan devices when no FS is mounted 1245 */ 1246static long btrfs_control_ioctl(struct file *file, unsigned int cmd, 1247 unsigned long arg) --- 165 unchanged lines hidden --- |