Lines Matching refs:root
251 struct btrfs_root *root, const char *function, in __btrfs_abort_transaction() argument
258 &root->fs_info->fs_state)) { in __btrfs_abort_transaction()
269 btrfs_warn(root->fs_info, in __btrfs_abort_transaction()
276 wake_up(&root->fs_info->transaction_wait); in __btrfs_abort_transaction()
277 wake_up(&root->fs_info->transaction_blocked_wait); in __btrfs_abort_transaction()
278 __btrfs_std_error(root->fs_info, function, line, errno, NULL); in __btrfs_abort_transaction()
388 int btrfs_parse_options(struct btrfs_root *root, char *options) in btrfs_parse_options() argument
390 struct btrfs_fs_info *info = root->fs_info; in btrfs_parse_options()
399 cache_gen = btrfs_super_cache_generation(root->fs_info->super_copy); in btrfs_parse_options()
424 btrfs_info(root->fs_info, "allowing degraded mounts"); in btrfs_parse_options()
437 btrfs_set_and_info(root, NODATASUM, in btrfs_parse_options()
441 if (btrfs_test_opt(root, NODATASUM)) { in btrfs_parse_options()
442 if (btrfs_test_opt(root, NODATACOW)) in btrfs_parse_options()
443 btrfs_info(root->fs_info, "setting datasum, datacow enabled"); in btrfs_parse_options()
445 btrfs_info(root->fs_info, "setting datasum"); in btrfs_parse_options()
451 if (!btrfs_test_opt(root, NODATACOW)) { in btrfs_parse_options()
452 if (!btrfs_test_opt(root, COMPRESS) || in btrfs_parse_options()
453 !btrfs_test_opt(root, FORCE_COMPRESS)) { in btrfs_parse_options()
454 btrfs_info(root->fs_info, in btrfs_parse_options()
457 btrfs_info(root->fs_info, "setting nodatacow"); in btrfs_parse_options()
466 btrfs_clear_and_info(root, NODATACOW, in btrfs_parse_options()
501 btrfs_set_and_info(root, FORCE_COMPRESS, in btrfs_parse_options()
505 if (!btrfs_test_opt(root, COMPRESS)) in btrfs_parse_options()
506 btrfs_info(root->fs_info, in btrfs_parse_options()
519 btrfs_set_and_info(root, SSD, in btrfs_parse_options()
523 btrfs_set_and_info(root, SSD_SPREAD, in btrfs_parse_options()
528 btrfs_set_and_info(root, NOSSD, in btrfs_parse_options()
533 btrfs_clear_and_info(root, NOBARRIER, in btrfs_parse_options()
537 btrfs_set_and_info(root, NOBARRIER, in btrfs_parse_options()
560 root->sectorsize); in btrfs_parse_options()
562 btrfs_info(root->fs_info, "max_inline at %llu", in btrfs_parse_options()
576 btrfs_info(root->fs_info, "allocations start at %llu", in btrfs_parse_options()
585 root->fs_info->sb->s_flags |= MS_POSIXACL; in btrfs_parse_options()
588 btrfs_err(root->fs_info, in btrfs_parse_options()
594 root->fs_info->sb->s_flags &= ~MS_POSIXACL; in btrfs_parse_options()
597 btrfs_set_and_info(root, NOTREELOG, in btrfs_parse_options()
601 btrfs_clear_and_info(root, NOTREELOG, in btrfs_parse_options()
605 btrfs_set_and_info(root, FLUSHONCOMMIT, in btrfs_parse_options()
609 btrfs_clear_and_info(root, FLUSHONCOMMIT, in btrfs_parse_options()
618 btrfs_info(root->fs_info, "metadata ratio %d", in btrfs_parse_options()
626 btrfs_set_and_info(root, DISCARD, in btrfs_parse_options()
630 btrfs_clear_and_info(root, DISCARD, in btrfs_parse_options()
634 btrfs_set_and_info(root, SPACE_CACHE, in btrfs_parse_options()
641 btrfs_clear_and_info(root, SPACE_CACHE, in btrfs_parse_options()
653 btrfs_set_and_info(root, CLEAR_CACHE, in btrfs_parse_options()
666 btrfs_set_and_info(root, AUTO_DEFRAG, in btrfs_parse_options()
670 btrfs_clear_and_info(root, AUTO_DEFRAG, in btrfs_parse_options()
674 btrfs_info(root->fs_info, "enabling auto recovery"); in btrfs_parse_options()
682 btrfs_info(root->fs_info, in btrfs_parse_options()
689 btrfs_info(root->fs_info, "enabling check integrity"); in btrfs_parse_options()
698 btrfs_info(root->fs_info, "check_integrity_print_mask 0x%x", in btrfs_parse_options()
709 btrfs_err(root->fs_info, in btrfs_parse_options()
730 btrfs_err(root->fs_info, "invalid commit interval"); in btrfs_parse_options()
736 btrfs_warn(root->fs_info, "excessive commit interval %d", in btrfs_parse_options()
741 btrfs_info(root->fs_info, "using default commit interval %ds", in btrfs_parse_options()
747 btrfs_info(root->fs_info, "unrecognized mount option '%s'", p); in btrfs_parse_options()
755 if (!ret && btrfs_test_opt(root, SPACE_CACHE)) in btrfs_parse_options()
756 btrfs_info(root->fs_info, "disk space caching is enabled"); in btrfs_parse_options()
848 struct btrfs_root *root = fs_info->tree_root; in get_default_root() local
879 di = btrfs_lookup_dir_item(NULL, root, path, dir_id, "default", 7, 0); in get_default_root()
991 struct btrfs_root *root = fs_info->tree_root; in btrfs_sync_fs() local
1002 trans = btrfs_attach_transaction_barrier(root); in btrfs_sync_fs()
1022 trans = btrfs_start_transaction(root, 0); in btrfs_sync_fs()
1027 return btrfs_commit_transaction(trans, root); in btrfs_sync_fs()
1033 struct btrfs_root *root = info->tree_root; in btrfs_show_options() local
1036 if (btrfs_test_opt(root, DEGRADED)) in btrfs_show_options()
1038 if (btrfs_test_opt(root, NODATASUM)) in btrfs_show_options()
1040 if (btrfs_test_opt(root, NODATACOW)) in btrfs_show_options()
1042 if (btrfs_test_opt(root, NOBARRIER)) in btrfs_show_options()
1051 if (btrfs_test_opt(root, COMPRESS)) { in btrfs_show_options()
1056 if (btrfs_test_opt(root, FORCE_COMPRESS)) in btrfs_show_options()
1061 if (btrfs_test_opt(root, NOSSD)) in btrfs_show_options()
1063 if (btrfs_test_opt(root, SSD_SPREAD)) in btrfs_show_options()
1065 else if (btrfs_test_opt(root, SSD)) in btrfs_show_options()
1067 if (btrfs_test_opt(root, NOTREELOG)) in btrfs_show_options()
1069 if (btrfs_test_opt(root, FLUSHONCOMMIT)) in btrfs_show_options()
1071 if (btrfs_test_opt(root, DISCARD)) in btrfs_show_options()
1073 if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) in btrfs_show_options()
1075 if (btrfs_test_opt(root, SPACE_CACHE)) in btrfs_show_options()
1079 if (btrfs_test_opt(root, RESCAN_UUID_TREE)) in btrfs_show_options()
1081 if (btrfs_test_opt(root, CLEAR_CACHE)) in btrfs_show_options()
1083 if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED)) in btrfs_show_options()
1085 if (btrfs_test_opt(root, ENOSPC_DEBUG)) in btrfs_show_options()
1087 if (btrfs_test_opt(root, AUTO_DEFRAG)) in btrfs_show_options()
1089 if (btrfs_test_opt(root, INODE_MAP_CACHE)) in btrfs_show_options()
1091 if (btrfs_test_opt(root, SKIP_BALANCE)) in btrfs_show_options()
1093 if (btrfs_test_opt(root, RECOVERY)) in btrfs_show_options()
1096 if (btrfs_test_opt(root, CHECK_INTEGRITY_INCLUDING_EXTENT_DATA)) in btrfs_show_options()
1098 else if (btrfs_test_opt(root, CHECK_INTEGRITY)) in btrfs_show_options()
1107 if (btrfs_test_opt(root, PANIC_ON_FATAL_ERROR)) in btrfs_show_options()
1194 struct dentry *root; in mount_subvol() local
1231 root = mount_subtree(mnt, subvol_name); in mount_subvol()
1233 if (!IS_ERR(root) && !is_subvolume_inode(d_inode(root))) { in mount_subvol()
1234 struct super_block *s = root->d_sb; in mount_subvol()
1235 dput(root); in mount_subvol()
1236 root = ERR_PTR(-EINVAL); in mount_subvol()
1242 return root; in mount_subvol()
1306 struct dentry *root; in btrfs_mount() local
1327 root = mount_subvol(subvol_name, flags, device_name, data); in btrfs_mount()
1329 return root; in btrfs_mount()
1396 root = !error ? get_default_root(s, subvol_objectid) : ERR_PTR(error); in btrfs_mount()
1397 if (IS_ERR(root)) { in btrfs_mount()
1399 error = PTR_ERR(root); in btrfs_mount()
1406 dput(root); in btrfs_mount()
1411 return root; in btrfs_mount()
1487 struct btrfs_root *root = fs_info->tree_root; in btrfs_remount() local
1515 ret = btrfs_parse_options(root, data); in btrfs_remount()
1546 ret = btrfs_commit_super(root); in btrfs_remount()
1550 if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state)) { in btrfs_remount()
1581 ret = btrfs_recover_relocation(root); in btrfs_remount()
1659 static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes) in btrfs_calc_avail_data_space() argument
1661 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_calc_avail_data_space()
1695 type = btrfs_get_alloc_profile(root, 1); in btrfs_calc_avail_data_space()
1922 buf->f_fsid.val[0] ^= BTRFS_I(d_inode(dentry))->root->objectid >> 32; in btrfs_statfs()
1923 buf->f_fsid.val[1] ^= BTRFS_I(d_inode(dentry))->root->objectid; in btrfs_statfs()
1993 struct btrfs_root *root = btrfs_sb(sb)->tree_root; in btrfs_freeze() local
1995 trans = btrfs_attach_transaction_barrier(root); in btrfs_freeze()
2002 return btrfs_commit_transaction(trans, root); in btrfs_freeze()
2005 static int btrfs_show_devname(struct seq_file *m, struct dentry *root) in btrfs_show_devname() argument
2007 struct btrfs_fs_info *fs_info = btrfs_sb(root->d_sb); in btrfs_show_devname()