search for: nr_items

Displaying 17 results from an estimated 17 matches for "nr_items".

2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...t; + __u64 max_offset; + + /* max and min transids to search for */ + __u64 min_transid; + __u64 max_transid; + + /* keys returned will be >= min and <= max */ + __u32 min_type; + __u32 max_type; + + /* + * how many items did userland ask for, and how many are we + * returning + */ + __u32 nr_items; + + /* align to 64 bits */ + __u32 unused; + + /* some extra for later */ + __u64 unused1; + __u64 unused2; + __u64 unused3; + __u64 unused4; +}; + +struct btrfs_ioctl_search_header { + __u64 transid; + __u64 objectid; + __u64 offset; + __u32 type; + __u32 len; +} __attribute__((may_alias)); + +#d...
2013 May 07
2
[PATCH] Btrfs: fix passing wrong arg gfp_t to decide the correct allocation mode
...p op) { - return __tree_mod_log_insert_key(fs_info, eb, slot, op, GFP_NOFS); + return __tree_mod_log_insert_key(fs_info, eb, slot, op, GFP_ATOMIC); } static noinline int tree_mod_log_insert_move(struct btrfs_fs_info *fs_info, struct extent_buffer *eb, int dst_slot, int src_slot, - int nr_items, gfp_t flags) + int nr_items) { struct tree_mod_elem *tm; int ret; @@ -642,7 +642,7 @@ tree_mod_log_insert_move(struct btrfs_fs_info *fs_info, BUG_ON(ret < 0); } - ret = tree_mod_alloc(fs_info, flags, &tm); + ret = tree_mod_alloc(fs_info, GFP_ATOMIC, &tm); if (ret < 0...
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
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix file descriptors leak
...bvol) if (ret < 0) { fprintf(stderr, "ERROR: can't perform the search\n"); subvol[0] = '\0'; + if (fd >= 0) + close(fd); return NULL; } /* the ioctl returns the number of item it found in nr_items */ @@ -891,6 +896,8 @@ static char * get_default_subvol(char * rootdir, char * subvol) if (defaultsubvolid == 0) { subvol[0] = '\0'; + if (fd >= 0) + close(fd); return NULL; } @@ -922,6 +929,8 @@ static char * get_default_subvol(char * rootdir,...
2010 Dec 11
1
[RFC] Improve btrfs subvolume find-new command
...0; - char *cache_dir_name = NULL; - char *cache_full_name = NULL; struct btrfs_file_extent_item backup; memset(&backup, 0, sizeof(backup)); + + /* + * for each item, pull the key out of the header and then + * read the root_ref item it contains + */ + for (off = 0, i = 0; i < sk->nr_items; i++) { + sh = (struct btrfs_ioctl_search_header *)(args->buf + + off); + off += sizeof(*sh); + + /* + * just in case the item was too big, pass something other + * than garbage + */ + if (sh->len == 0) + item = &backup; + else + item = (struct btrfs_file_extent_ite...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix file descriptors leak
...bvol) if (ret < 0) { fprintf(stderr, "ERROR: can't perform the search\n"); subvol[0] = '\0'; + if (fd >= 0) + close(fd); return NULL; } /* the ioctl returns the number of item it found in nr_items */ @@ -891,6 +896,8 @@ static char * get_default_subvol(char * rootdir, char * subvol) if (defaultsubvolid == 0) { subvol[0] = '\0'; + if (fd >= 0) + close(fd); return NULL; } @@ -922,6 +929,8 @@ static char * get_default_subvol(char * rootdir,...
2010 Dec 14
0
[PATCH] BTRFS_IOC_TREE_SEARCH: store and use the last key found
..._key.type = sk->max_type; @@ -1207,6 +1207,11 @@ static noinline int search_ioctl(struct inode *inode, } ret = 0; err: + /* save the key for an hypothetic next iteration */ + sk->start_objectid = key.objectid; + sk->start_type = key.type; + sk->start_offset = key.offset; + sk->nr_items = num_found; btrfs_free_path(path); return ret; @@ -1234,6 +1239,39 @@ static noinline int btrfs_ioctl_tree_search(struct file *file, return ret; } +static noinline int btrfs_ioctl_tree_search_old(struct file *file, + void __user *argp) +{ + struct btrfs_ioctl_search_args *args; +...
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 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
2010 Aug 02
1
kernel panic not syncing fatal exception due to reiserfs -- rebooted properly on ext3
...imes Aug 2 19:52:34 mmail last message repeated 12 times Aug 2 19:52:52 mmail kernel: ReiserFS: sda6: warning: vs-13060: reiserfs_update_sd: stat data of object [2 203562 0x0 SD] (nlink == 2) not found (pos 1) Aug 2 19:52:56 mmail kernel: ReiserFS: warning: is_leaf: free space seems wrong: level=1, nr_items=2, free_space=65512 rdkey Aug 2 19:52:56 mmail kernel: ReiserFS: sda6: warning: vs-5150: search_by_key: invalid format found in block 37030. Fsck? Aug 2 19:52:56 mmail kernel: ReiserFS: sda6: warning: vs-13050: reiserfs_update_sd: i/o failure occurred trying to update [2 203562 0x0 SD] stat data Au...
2011 Jul 07
5
[PATCH v1 0/2] Btrfs-progs: commands "resolve inode" and "resolve logical"
The kernel patch series just sent (Subject: "Btrfs: scrub: print path to corrupted files and trigger nodatasum fixup") introduces two new ioctls to do in-kernel filesystem path construction. This series provides the corresponding userspace changes, adding two new commands to the btrfs utility: -- btrfs resolve inode [-v] <inode> <path> resolves an <inode> to all
2018 Nov 02
0
[PATCH v3 2/4] common/utils: Move libxml2 writer macros to a common header file.
...__VA_ARGS__) == -1) { \ + xml_error ("xmlTextWriterWriteFormatString"); \ + } \ + } while (0) + +/** + * To define a comment in the XML, use: + * + * comment ("number of items = %d", nr_items); + */ +#define comment(fs,...) \ + do { \ + if (xmlTextWriterWriteFormatComment (xo, fs, ##__VA_ARGS__) == -1) { \ + xml_error ("xmlTextWriterWriteFormatComment");...
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...__VA_ARGS__) == -1) { \ + xml_error ("xmlTextWriterWriteFormatString"); \ + } \ + } while (0) + +/** + * To define a comment in the XML, use: + * + * comment ("number of items = %d", nr_items); + */ +#define comment(fs,...) \ + do { \ + if (xmlTextWriterWriteFormatComment (xo, fs, ##__VA_ARGS__) == -1) { \ + xml_error ("xmlTextWriterWriteFormatComment");...
2018 Nov 02
7
[PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html v3: - Back to using string/string_format and attribute/attribute_format. - Add both single_element and single_element_format. - Rebased and retested. Rich.
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html However it was broken in a few ways. First of all the documentation was broken because "/**" enhanced comments were not permitted on macros. This is fixed in the new 1/4 patch. Secondly we didn't use single_element() everywhere possible, which is fixed in the new 4/4 patch. Lastly I've
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed