search for: btrfs_uuid_size

Displaying 20 results from an estimated 22 matches for "btrfs_uuid_size".

2013 Apr 11
0
[PATCH] Btrfs-progs: enhance 'btrfs subvolume list'
...= btrfs_stack_timespec_sec(&ritem->ctime); + rinfo->otime = btrfs_stack_timespec_sec(&ritem->otime); + rinfo->stime = btrfs_stack_timespec_sec(&ritem->stime); + rinfo->rtime = btrfs_stack_timespec_sec(&ritem->rtime); + memcpy(rinfo->uuid, ritem->uuid, BTRFS_UUID_SIZE); + memcpy(rinfo->puuid, ritem->parent_uuid, BTRFS_UUID_SIZE); + memcpy(rinfo->ruuid, ritem->received_uuid, BTRFS_UUID_SIZE); + } + + /* TODO: this is copied from the old code, what is it good for? */ + if ((!ritem || !btrfs_root_otransid(ritem)) && root_offset) + rinfo->o...
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)
2013 Oct 18
11
[GIT PULL] Btrfs
Hi Linus, My for-linus branch has a one line fix: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus Sage hit a deadlock with ceph on btrfs, and Josef tracked it down to a regression in our initial rc1 pull. When doing nocow writes we were sometimes starting a transaction with locks held. Josef Bacik (1) commits (+1/-0): Btrfs: release path before starting
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...O_RDWR, check_mount); else - ret = btrfs_open_devices(fs_devices, O_RDONLY); + ret = btrfs_open_devices(fs_devices, O_RDONLY, check_mount); BUG_ON(ret); fs_info->super_bytenr = sb_bytenr; @@ -725,7 +725,7 @@ struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, BTRFS_UUID_SIZE); if (!(btrfs_super_flags(disk_super) & BTRFS_SUPER_FLAG_METADUMP)) { - ret = btrfs_read_chunk_tree(chunk_root); + ret = btrfs_read_chunk_tree(chunk_root, check_mount); BUG_ON(ret); } diff --git a/disk-io.h b/disk-io.h index 49e5692..1d6519e 100644 --- a/disk-io.h +++ b/disk-io.h @...
2012 May 25
6
[PATCH v5 0/3] Btrfs: add IO error device stats
Changes v1-v2: - Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged operation - Cast u64 to unsigned long long for printf() Changes v2-v3: - Rebased on Chris'' current master Changes v3-v4: - Add padding at end of ioctl structure Changes v4-v5: - The statistic members in the ioctl are now organized as an array of 64 bit values. Symbolic names for the array indexes
2014 Mar 05
0
[PATCH] Btrfs-progs: remove unused variable and update btrfs-image man page
...+= sizeof(*disk_key); cur += sizeof(*disk_key); - new_cur += sizeof(*disk_key); if (key.type == BTRFS_CHUNK_ITEM_KEY) { chunk = (struct btrfs_chunk *)ptr; @@ -1406,7 +1404,6 @@ static int update_super(u8 *buffer) memcpy(chunk->stripe.dev_uuid, super->dev_item.uuid, BTRFS_UUID_SIZE); new_array_size += sizeof(*chunk); - new_cur += sizeof(*chunk); } else { fprintf(stderr, "Bogus key in the sys chunk array " "%d\n", key.type); diff --git a/man/btrfs-image.8.in b/man/btrfs-image.8.in index d5ba594..3f51f3f 100644 --- a/man/btrfs-image.8.in ++...
2009 Jan 16
4
[PATCH] Btrfs: simplify iteration codes
...u64 devid, u8 *uuid) { struct btrfs_device *dev; - struct list_head *cur; - list_for_each(cur, head) { - dev = list_entry(cur, struct btrfs_device, dev_list); + list_for_each_entry(dev, head, dev_list) { if (dev->devid == devid && (!uuid || !memcmp(dev->uuid, uuid, BTRFS_UUID_SIZE))) { return dev; @@ -118,11 +116,9 @@ static noinline struct btrfs_device *__find_device(struct list_head *head, static noinline struct btrfs_fs_devices *find_fsid(u8 *fsid) { - struct list_head *cur; struct btrfs_fs_devices *fs_devices; - list_for_each(cur, &fs_uuids) { - fs_devic...
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
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated and the data checksums fetched. The extents are read sequentially and the checksums verified. If an error occurs (checksum or EIO), a good copy
2013 Apr 09
19
[PATCH 00/17] Btrfs-progs: some receive related patches
...g output Btrfs-progs: small parent_subvol cleanup for cmds-receive.c Btrfs-progs: fix bug in find_root_gen Btrfs-progs: btrfs-receive optionally honors the end-cmd Btrfs-progs: don''t allocate one byte too much each time Btrfs-progs: Fix that BTRFS_FSID_SIZE is used instead of BTRFS_UUID_SIZE Btrfs-progs: remove some unused code Btrfs-progs: allow to receive to relative directories btrfs-list.c | 14 ++--- cmds-receive.c | 164 ++++++++++++++++++++++++++++++++++++++++++--------------- cmds-send.c | 12 ++++- send-stream.c | 9 ++-- send-stream.h | 3 +- send-utils.c...
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 Dec 16
6
[PATCH 0/3] Send: minor cleanups, add RO checks
First two patches are trivial cleanups that I''ve spotted while reading send.c, can be applied independently. The third patch contains the important bits, safety checks that the subvolumes involved in send do not accidentally lose the RO status. I haven''t seen this documented anywhere that this is mandatory, implied from how I assume send works. Please let me know if this is
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
''bh'' is forgot to release if no error is detected Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> --- fs/btrfs/volumes.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8b9fb8c..69fc902 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -631,6 +631,7 @@ static int
2012 Nov 01
41
[Request for review] [RFC] Add label support for snapshots and subvols
From: Anand Jain <anand.jain@oracle.com> (This patch is for the review/test not yet for the integration). Here is an implementation of the feature to add 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
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...ans->transid, level, c->start, 0); + root->root_key.objectid, + &disk_key, level, c->start, 0); if (IS_ERR(split)) return PTR_ERR(split); @@ -1531,7 +1574,6 @@ static int split_node(struct btrfs_trans (unsigned long)btrfs_header_chunk_tree_uuid(split), BTRFS_UUID_SIZE); - mid = (c_nritems + 1) / 2; copy_extent_buffer(split, c, btrfs_node_key_ptr_offset(0), @@ -1544,16 +1586,12 @@ static int split_node(struct btrfs_trans btrfs_mark_buffer_dirty(c); btrfs_mark_buffer_dirty(split); - btrfs_node_key(split, &disk_key, 0); wret = insert_ptr(tr...
2011 Jul 18
5
[PATCH v3 0/5] btrfs-progs: scrub interface
This is the next patch series for scrub userland tools. Change log v1->v2: - commands now reachable as "btrfs scrub ..." instead of "btrfs filesystem scrub ..." - ability to scrub a single device instead of a whole file system - superfluous command line options removed - resume is now a separate command ("scrub resume") instead of "scrub start -r" -
2011 Dec 09
10
[PATCH 0/3] Btrfs: add IO error device stats
The goal is to detect when drives start to get an increased error rate, when drives should be replaced soon. Therefore statistic counters are added that count IO errors (read, write and flush). Additionally, the software detected errors like checksum errors and corrupted blocks are counted. An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...ffer *leaf, + struct btrfs_dev_item *dev_item, + struct btrfs_device *device) { unsigned long ptr; @@ -3508,8 +3507,6 @@ static int fill_device_from_item(struct extent_buffer *leaf, ptr = (unsigned long)btrfs_device_uuid(dev_item); read_extent_buffer(leaf, device->uuid, ptr, BTRFS_UUID_SIZE); - - return 0; } static int open_seed_devices(struct btrfs_root *root, u8 *fsid) diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 6d866db..f019e54 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -202,7 +202,7 @@ int btrfs_add_device(struct btrfs_trans_handle *trans,...
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk free space cache. Others are small fixes and cleanups. The last three have been sent weeks ago. The patchset is also available in this repo: git://repo.or.cz/linux-btrfs-devel.git for-chris Note there''s a small confict with Al Viro''s vfs changes. Li Zefan (11): Btrfs: add pinned extents to
2012 Jun 29
12
[PATCH 1/3] Btrfs-progs: add support to set subvolume/snapshot readonly
...--git a/ioctl.h b/ioctl.h index f2e5d8d..9c066eb 100644 --- a/ioctl.h +++ b/ioctl.h @@ -42,6 +42,11 @@ struct btrfs_ioctl_vol_args_v2 { char name[BTRFS_SUBVOL_NAME_MAX + 1]; }; +struct btrfs_ioctl_get_set_flags_args { + __u64 objectid; + __u64 flags; +}; + #define BTRFS_FSID_SIZE 16 #define BTRFS_UUID_SIZE 16 @@ -312,6 +317,8 @@ struct btrfs_ioctl_logical_ino_args { struct btrfs_ioctl_space_args) #define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \ struct btrfs_ioctl_vol_args_v2) +#define BTRFS_IOC_SUBVOL_GETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 25, __u64) +#define BTRFS_IOC_SUB...