search for: btrfs_root_item

Displaying 12 results from an estimated 12 matches for "btrfs_root_item".

2010 Nov 30
1
R: Re: [PATCH 5/5] btrfs: Add ioctl to set snapshot readonly/writable
...HOT with SUBVOLUME >> - Finally, with a pair of get/set_flags functions we can avoid the use of the >> flags BTRFS_SNAPSHOT_WRITABLE. >> > >There are some reasons that I created this interface: > >- set/getflags should set/get root flags which reflect in struct >btrfs_root_item->flags. > >- btrfs_root_item->flags was not used at all before this patch, so >(no)compress and (no)datasum is not reflect in ->flags. > >- _CREATE_ASYNC flag is to create snapshot asynchronously, so it''s not >a flag of tree root. Of course I never mind about _...
2012 Aug 01
17
[PATCH] add crtime to the snapshot list
From: Anand <anand.jain@oracle.com> This patch adds creation-time to the snapshot list display, which would help user to better manage the snapshots when number of snapshots grow substantially. This patch is developed and on top of the send/receive btrfs and btrfs-progs repo at git://github.com/ablock84/linux-btrfs.git (send-v2) git://github.com/ablock84/btrfs-progs.git (send-v2)
2012 Nov 01
41
[Request for review] [RFC] Add label support for snapshots and subvols
...label to the subvolume and snapshots. Which would help sysadmin to better manager the subvol and snapshots. This can be done in two ways, one - using attr which is user land only changes but drawback is able to change the label using the non btrfs cli. And the other way is to add a member to btrfs_root_item in the btrfs kernel to hold the label info for each snapshot and subvol. The drawback here is having to introduce V3 version of this structure. If there is any better way pls do share. The patch code is for the review. Any comments/suggestion welcome. Below is a demo of this new feature. -----...
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
...-- 1 file changed, 91 insertions(+), 10 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index 668af15..268cc64 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -119,6 +119,12 @@ struct inode_backref { char name[0]; }; +struct dropping_root_item_record { + struct list_head list; + struct btrfs_root_item ri; + struct btrfs_key found_key; +}; + #define REF_ERR_NO_DIR_ITEM (1 << 0) #define REF_ERR_NO_DIR_INDEX (1 << 1) #define REF_ERR_NO_INODE_REF (1 << 2) @@ -3600,6 +3606,21 @@ static int check_csums(struct btrfs_root *root) return errors; } +static int is_dropped_key(st...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...cow to do more fine-grained checking. Regards Signed-off-by: Yan Zheng <zheng.yan@oracle.com> --- diff -urp 3/fs/btrfs/ctree.h 4/fs/btrfs/ctree.h --- 3/fs/btrfs/ctree.h 2008-10-27 16:31:51.000000000 +0800 +++ 4/fs/btrfs/ctree.h 2008-10-27 16:34:27.000000000 +0800 @@ -445,6 +445,7 @@ struct btrfs_root_item { __le64 bytenr; __le64 byte_limit; __le64 bytes_used; + __le64 last_snapshot; __le32 flags; __le32 refs; struct btrfs_disk_key drop_progress; @@ -1375,6 +1376,8 @@ BTRFS_SETGET_STACK_FUNCS(root_refs, stru BTRFS_SETGET_STACK_FUNCS(root_flags, struct btrfs_root_item, flags, 32); BTRFS_...
2013 Aug 27
7
[PATCH] Btrfs: fix deadlock in uuid scan kthread
...+++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f42e412..44cd21b 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3465,7 +3465,7 @@ static int btrfs_uuid_scan_kthread(void *data) int slot; struct btrfs_root_item root_item; u32 item_size; - struct btrfs_trans_handle *trans; + struct btrfs_trans_handle *trans = NULL; path = btrfs_alloc_path(); if (!path) { @@ -3509,7 +3509,13 @@ static int btrfs_uuid_scan_kthread(void *data) (int)sizeof(root_item)); if (btrfs_root_refs(&root_item) == 0...
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply
2013 Apr 11
0
[PATCH] Btrfs-progs: enhance 'btrfs subvolume list'
...oot_id, u64 ref_tree, u64 root_offset, u64 flags, - u64 dir_id, char *name, int name_len, u64 ogen, u64 gen, - time_t ot, void *uuid, void *puuid) +static int set_root_info(struct root_info *rinfo, u64 ref_tree, u64 root_offset, + u64 dir_id, char *name, int name_len, + struct btrfs_root_item *ritem, u32 ritem_len) { - struct root_info *ri; + int is_v0 = (ritem_len <= sizeof(struct btrfs_root_item_v0)); - ri = root_tree_search(root_lookup, root_id); - if (!ri || ri->root_id != root_id) - return -ENOENT; - if (name && name_len > 0) { - if (ri->name) - free(ri-&...
2013 Jun 04
3
[PATCH] Btrfs: fix broken nocow after balance
Balance will create reloc_root for each fs root, and it''s going to record last_snapshot to filter shared blocks. The side effect of setting last_snapshot is to break nocow attributes of files. So it turns out that checking last_snapshot does not always ensure that a node/leaf/file_extent is shared. That''s why shared node/leaf needs to search extent tree for number of
2012 Oct 29
5
Re: [PATCH 2/9] uuid: use random32_get_bytes()
On Sun, Oct 28, 2012 at 04:18:59PM +0900, Akinobu Mita wrote: > Use random32_get_bytes() to generate 16 bytes of pseudo-random bytes. > > Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Since your patch is going to allow users to set the random seed, it means that what had previously been a bad security bug has just become a grievous security bug. If you are going to be
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...iff -urp btrfs-progs-unstable/mkfs.c btrfs-progs-2/mkfs.c --- btrfs-progs-unstable/mkfs.c 2009-01-13 18:55:53.216451553 +0800 +++ btrfs-progs-2/mkfs.c 2009-05-02 19:31:37.000000000 +0800 @@ -252,7 +252,7 @@ static int create_data_reloc_tree(struct location.objectid = objectid; location.type = BTRFS_ROOT_ITEM_KEY; - location.offset = trans->transid; + location.offset = 0; ret = btrfs_insert_root(trans, root->fs_info->tree_root, &location, &root_item); BUG_ON(ret); diff -urp btrfs-progs-unstable/print-tree.c btrfs-progs-2/print-tree.c --- btrfs-progs-unstable/print-tree.c 2009-0...
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them