Lines Matching refs:root
236 struct btrfs_root *root, const char *function, in __btrfs_abort_transaction() argument
246 btrfs_warn(root->fs_info, in __btrfs_abort_transaction()
253 wake_up(&root->fs_info->transaction_wait); in __btrfs_abort_transaction()
254 wake_up(&root->fs_info->transaction_blocked_wait); in __btrfs_abort_transaction()
255 __btrfs_std_error(root->fs_info, function, line, errno, NULL); in __btrfs_abort_transaction()
374 int btrfs_parse_options(struct btrfs_root *root, char *options) in btrfs_parse_options() argument
376 struct btrfs_fs_info *info = root->fs_info; in btrfs_parse_options()
385 cache_gen = btrfs_super_cache_generation(root->fs_info->super_copy); in btrfs_parse_options()
410 btrfs_info(root->fs_info, "allowing degraded mounts"); in btrfs_parse_options()
423 btrfs_set_and_info(root, NODATASUM, in btrfs_parse_options()
427 if (btrfs_test_opt(root, NODATASUM)) { in btrfs_parse_options()
428 if (btrfs_test_opt(root, NODATACOW)) in btrfs_parse_options()
429 btrfs_info(root->fs_info, "setting datasum, datacow enabled"); in btrfs_parse_options()
431 btrfs_info(root->fs_info, "setting datasum"); in btrfs_parse_options()
437 if (!btrfs_test_opt(root, NODATACOW)) { in btrfs_parse_options()
438 if (!btrfs_test_opt(root, COMPRESS) || in btrfs_parse_options()
439 !btrfs_test_opt(root, FORCE_COMPRESS)) { in btrfs_parse_options()
440 btrfs_info(root->fs_info, in btrfs_parse_options()
443 btrfs_info(root->fs_info, "setting nodatacow"); in btrfs_parse_options()
452 btrfs_clear_and_info(root, NODATACOW, in btrfs_parse_options()
487 btrfs_set_and_info(root, FORCE_COMPRESS, in btrfs_parse_options()
491 if (!btrfs_test_opt(root, COMPRESS)) in btrfs_parse_options()
492 btrfs_info(root->fs_info, in btrfs_parse_options()
505 btrfs_set_and_info(root, SSD, in btrfs_parse_options()
509 btrfs_set_and_info(root, SSD_SPREAD, in btrfs_parse_options()
514 btrfs_set_and_info(root, NOSSD, in btrfs_parse_options()
519 btrfs_clear_and_info(root, NOBARRIER, in btrfs_parse_options()
523 btrfs_set_and_info(root, NOBARRIER, in btrfs_parse_options()
546 root->sectorsize); in btrfs_parse_options()
548 btrfs_info(root->fs_info, "max_inline at %llu", in btrfs_parse_options()
562 btrfs_info(root->fs_info, "allocations start at %llu", in btrfs_parse_options()
571 root->fs_info->sb->s_flags |= MS_POSIXACL; in btrfs_parse_options()
574 btrfs_err(root->fs_info, in btrfs_parse_options()
580 root->fs_info->sb->s_flags &= ~MS_POSIXACL; in btrfs_parse_options()
583 btrfs_set_and_info(root, NOTREELOG, in btrfs_parse_options()
587 btrfs_clear_and_info(root, NOTREELOG, in btrfs_parse_options()
591 btrfs_set_and_info(root, FLUSHONCOMMIT, in btrfs_parse_options()
595 btrfs_clear_and_info(root, FLUSHONCOMMIT, in btrfs_parse_options()
604 btrfs_info(root->fs_info, "metadata ratio %d", in btrfs_parse_options()
612 btrfs_set_and_info(root, DISCARD, in btrfs_parse_options()
616 btrfs_clear_and_info(root, DISCARD, in btrfs_parse_options()
620 btrfs_set_and_info(root, SPACE_CACHE, in btrfs_parse_options()
627 btrfs_clear_and_info(root, SPACE_CACHE, in btrfs_parse_options()
639 btrfs_set_and_info(root, CLEAR_CACHE, in btrfs_parse_options()
652 btrfs_set_and_info(root, AUTO_DEFRAG, in btrfs_parse_options()
656 btrfs_clear_and_info(root, AUTO_DEFRAG, in btrfs_parse_options()
660 btrfs_info(root->fs_info, "enabling auto recovery"); in btrfs_parse_options()
668 btrfs_info(root->fs_info, in btrfs_parse_options()
675 btrfs_info(root->fs_info, "enabling check integrity"); in btrfs_parse_options()
684 btrfs_info(root->fs_info, "check_integrity_print_mask 0x%x", in btrfs_parse_options()
695 btrfs_err(root->fs_info, in btrfs_parse_options()
716 btrfs_err(root->fs_info, "invalid commit interval"); in btrfs_parse_options()
722 btrfs_warn(root->fs_info, "excessive commit interval %d", in btrfs_parse_options()
727 btrfs_info(root->fs_info, "using default commit interval %ds", in btrfs_parse_options()
734 btrfs_info(root->fs_info, "fragmenting all space"); in btrfs_parse_options()
739 btrfs_info(root->fs_info, "fragmenting metadata"); in btrfs_parse_options()
744 btrfs_info(root->fs_info, "fragmenting data"); in btrfs_parse_options()
749 btrfs_info(root->fs_info, "unrecognized mount option '%s'", p); in btrfs_parse_options()
757 if (!ret && btrfs_test_opt(root, SPACE_CACHE)) in btrfs_parse_options()
758 btrfs_info(root->fs_info, "disk space caching is enabled"); in btrfs_parse_options()
849 struct btrfs_root *root = fs_info->tree_root; in get_subvol_name_from_objectid() local
884 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in get_subvol_name_from_objectid()
888 ret = btrfs_previous_item(root, path, subvol_objectid, in get_subvol_name_from_objectid()
984 struct btrfs_root *root = fs_info->tree_root; in get_default_subvol_objectid() local
1001 di = btrfs_lookup_dir_item(NULL, root, path, dir_id, "default", 7, 0); in get_default_subvol_objectid()
1079 struct btrfs_root *root = fs_info->tree_root; in btrfs_sync_fs() local
1090 trans = btrfs_attach_transaction_barrier(root); in btrfs_sync_fs()
1110 trans = btrfs_start_transaction(root, 0); in btrfs_sync_fs()
1115 return btrfs_commit_transaction(trans, root); in btrfs_sync_fs()
1121 struct btrfs_root *root = info->tree_root; in btrfs_show_options() local
1124 if (btrfs_test_opt(root, DEGRADED)) in btrfs_show_options()
1126 if (btrfs_test_opt(root, NODATASUM)) in btrfs_show_options()
1128 if (btrfs_test_opt(root, NODATACOW)) in btrfs_show_options()
1130 if (btrfs_test_opt(root, NOBARRIER)) in btrfs_show_options()
1139 if (btrfs_test_opt(root, COMPRESS)) { in btrfs_show_options()
1144 if (btrfs_test_opt(root, FORCE_COMPRESS)) in btrfs_show_options()
1149 if (btrfs_test_opt(root, NOSSD)) in btrfs_show_options()
1151 if (btrfs_test_opt(root, SSD_SPREAD)) in btrfs_show_options()
1153 else if (btrfs_test_opt(root, SSD)) in btrfs_show_options()
1155 if (btrfs_test_opt(root, NOTREELOG)) in btrfs_show_options()
1157 if (btrfs_test_opt(root, FLUSHONCOMMIT)) in btrfs_show_options()
1159 if (btrfs_test_opt(root, DISCARD)) in btrfs_show_options()
1161 if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) in btrfs_show_options()
1163 if (btrfs_test_opt(root, SPACE_CACHE)) in btrfs_show_options()
1167 if (btrfs_test_opt(root, RESCAN_UUID_TREE)) in btrfs_show_options()
1169 if (btrfs_test_opt(root, CLEAR_CACHE)) in btrfs_show_options()
1171 if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED)) in btrfs_show_options()
1173 if (btrfs_test_opt(root, ENOSPC_DEBUG)) in btrfs_show_options()
1175 if (btrfs_test_opt(root, AUTO_DEFRAG)) in btrfs_show_options()
1177 if (btrfs_test_opt(root, INODE_MAP_CACHE)) in btrfs_show_options()
1179 if (btrfs_test_opt(root, SKIP_BALANCE)) in btrfs_show_options()
1181 if (btrfs_test_opt(root, RECOVERY)) in btrfs_show_options()
1184 if (btrfs_test_opt(root, CHECK_INTEGRITY_INCLUDING_EXTENT_DATA)) in btrfs_show_options()
1186 else if (btrfs_test_opt(root, CHECK_INTEGRITY)) in btrfs_show_options()
1195 if (btrfs_test_opt(root, PANIC_ON_FATAL_ERROR)) in btrfs_show_options()
1200 if (btrfs_test_opt(root, FRAGMENT_DATA)) in btrfs_show_options()
1202 if (btrfs_test_opt(root, FRAGMENT_METADATA)) in btrfs_show_options()
1206 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1277 struct dentry *root; in mount_subvol() local
1284 root = ERR_PTR(-ENOMEM); in mount_subvol()
1297 root = ERR_CAST(mnt); in mount_subvol()
1306 root = ERR_PTR(ret); in mount_subvol()
1312 root = ERR_CAST(mnt); in mount_subvol()
1322 root = ERR_PTR(ret); in mount_subvol()
1329 root = ERR_CAST(subvol_name); in mount_subvol()
1336 root = mount_subtree(mnt, subvol_name); in mount_subvol()
1340 if (!IS_ERR(root)) { in mount_subvol()
1341 struct super_block *s = root->d_sb; in mount_subvol()
1342 struct inode *root_inode = d_inode(root); in mount_subvol()
1343 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol()
1362 dput(root); in mount_subvol()
1363 root = ERR_PTR(ret); in mount_subvol()
1372 return root; in mount_subvol()
1612 struct btrfs_root *root = fs_info->tree_root; in btrfs_remount() local
1640 ret = btrfs_parse_options(root, data); in btrfs_remount()
1680 ret = btrfs_commit_super(root); in btrfs_remount()
1684 if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state)) { in btrfs_remount()
1715 ret = btrfs_recover_relocation(root); in btrfs_remount()
1793 static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes) in btrfs_calc_avail_data_space() argument
1795 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_calc_avail_data_space()
1829 type = btrfs_get_alloc_profile(root, 1); in btrfs_calc_avail_data_space()
2056 buf->f_fsid.val[0] ^= BTRFS_I(d_inode(dentry))->root->objectid >> 32; in btrfs_statfs()
2057 buf->f_fsid.val[1] ^= BTRFS_I(d_inode(dentry))->root->objectid; in btrfs_statfs()
2127 struct btrfs_root *root = btrfs_sb(sb)->tree_root; in btrfs_freeze() local
2129 trans = btrfs_attach_transaction_barrier(root); in btrfs_freeze()
2136 return btrfs_commit_transaction(trans, root); in btrfs_freeze()
2139 static int btrfs_show_devname(struct seq_file *m, struct dentry *root) in btrfs_show_devname() argument
2141 struct btrfs_fs_info *fs_info = btrfs_sb(root->d_sb); in btrfs_show_devname()