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 btrfs_get_subvol_name_from_objectid() local
884 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_get_subvol_name_from_objectid()
888 ret = btrfs_previous_item(root, path, subvol_objectid, in btrfs_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
1125 if (btrfs_test_opt(root, DEGRADED)) in btrfs_show_options()
1127 if (btrfs_test_opt(root, NODATASUM)) in btrfs_show_options()
1129 if (btrfs_test_opt(root, NODATACOW)) in btrfs_show_options()
1131 if (btrfs_test_opt(root, NOBARRIER)) in btrfs_show_options()
1140 if (btrfs_test_opt(root, COMPRESS)) { in btrfs_show_options()
1145 if (btrfs_test_opt(root, FORCE_COMPRESS)) in btrfs_show_options()
1150 if (btrfs_test_opt(root, NOSSD)) in btrfs_show_options()
1152 if (btrfs_test_opt(root, SSD_SPREAD)) in btrfs_show_options()
1154 else if (btrfs_test_opt(root, SSD)) in btrfs_show_options()
1156 if (btrfs_test_opt(root, NOTREELOG)) in btrfs_show_options()
1158 if (btrfs_test_opt(root, FLUSHONCOMMIT)) in btrfs_show_options()
1160 if (btrfs_test_opt(root, DISCARD)) in btrfs_show_options()
1162 if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) in btrfs_show_options()
1164 if (btrfs_test_opt(root, SPACE_CACHE)) in btrfs_show_options()
1168 if (btrfs_test_opt(root, RESCAN_UUID_TREE)) in btrfs_show_options()
1170 if (btrfs_test_opt(root, CLEAR_CACHE)) in btrfs_show_options()
1172 if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED)) in btrfs_show_options()
1174 if (btrfs_test_opt(root, ENOSPC_DEBUG)) in btrfs_show_options()
1176 if (btrfs_test_opt(root, AUTO_DEFRAG)) in btrfs_show_options()
1178 if (btrfs_test_opt(root, INODE_MAP_CACHE)) in btrfs_show_options()
1180 if (btrfs_test_opt(root, SKIP_BALANCE)) in btrfs_show_options()
1182 if (btrfs_test_opt(root, RECOVERY)) in btrfs_show_options()
1185 if (btrfs_test_opt(root, CHECK_INTEGRITY_INCLUDING_EXTENT_DATA)) in btrfs_show_options()
1187 else if (btrfs_test_opt(root, CHECK_INTEGRITY)) in btrfs_show_options()
1196 if (btrfs_test_opt(root, PANIC_ON_FATAL_ERROR)) in btrfs_show_options()
1201 if (btrfs_test_opt(root, FRAGMENT_DATA)) in btrfs_show_options()
1203 if (btrfs_test_opt(root, FRAGMENT_METADATA)) in btrfs_show_options()
1207 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1209 BTRFS_I(d_inode(dentry))->root->root_key.objectid); in btrfs_show_options()
1283 struct dentry *root; in mount_subvol() local
1290 root = ERR_PTR(-ENOMEM); in mount_subvol()
1303 root = ERR_CAST(mnt); in mount_subvol()
1312 root = ERR_PTR(ret); in mount_subvol()
1318 root = ERR_CAST(mnt); in mount_subvol()
1328 root = ERR_PTR(ret); in mount_subvol()
1335 root = ERR_CAST(subvol_name); in mount_subvol()
1342 root = mount_subtree(mnt, subvol_name); in mount_subvol()
1346 if (!IS_ERR(root)) { in mount_subvol()
1347 struct super_block *s = root->d_sb; in mount_subvol()
1348 struct inode *root_inode = d_inode(root); in mount_subvol()
1349 u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; in mount_subvol()
1368 dput(root); in mount_subvol()
1369 root = ERR_PTR(ret); in mount_subvol()
1378 return root; in mount_subvol()
1618 struct btrfs_root *root = fs_info->tree_root; in btrfs_remount() local
1646 ret = btrfs_parse_options(root, data); in btrfs_remount()
1686 ret = btrfs_commit_super(root); in btrfs_remount()
1690 if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state)) { in btrfs_remount()
1723 ret = btrfs_recover_relocation(root); in btrfs_remount()
1803 static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes) in btrfs_calc_avail_data_space() argument
1805 struct btrfs_fs_info *fs_info = root->fs_info; in btrfs_calc_avail_data_space()
1839 type = btrfs_get_alloc_profile(root, 1); in btrfs_calc_avail_data_space()
2084 buf->f_fsid.val[0] ^= BTRFS_I(d_inode(dentry))->root->objectid >> 32; in btrfs_statfs()
2085 buf->f_fsid.val[1] ^= BTRFS_I(d_inode(dentry))->root->objectid; in btrfs_statfs()
2156 struct btrfs_root *root = btrfs_sb(sb)->tree_root; in btrfs_freeze() local
2158 trans = btrfs_attach_transaction_barrier(root); in btrfs_freeze()
2165 return btrfs_commit_transaction(trans, root); in btrfs_freeze()
2168 static int btrfs_show_devname(struct seq_file *m, struct dentry *root) in btrfs_show_devname() argument
2170 struct btrfs_fs_info *fs_info = btrfs_sb(root->d_sb); in btrfs_show_devname()