Displaying 9 results from an estimated 9 matches for "btrfs_ioctl_search_key".
2010 Dec 14
0
[PATCH] BTRFS_IOC_TREE_SEARCH: store and use the last key found
Hi all,
following the thread about the BTRFS_IOC_TREE_SEARCH ioctl [1], I made a patch
which try to address the problem of restarting the ioctl.
In the current solution is the application during the restart of the search to
fill the min_* fields in the "struct btrfs_ioctl_search_key". In general the
values set are the last one returned "+1". But doing so we reduce the
"acceptance criteria window".
I propose to add three more fields in the struct btrfs_ioctl_search_key:
+ /* starting search key fields */
+ __u32 start_type;
+ __u64...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...eader */
@@ -19,4 +56,72 @@ struct btrfs_super_block {
u64 magic;
} __attribute__ ((__packed__));
+
+#define BTRFS_IOCTL_MAGIC 0x94
+#define BTRFS_VOL_NAME_MAX 255
+#define BTRFS_PATH_NAME_MAX 4087
+
+struct btrfs_ioctl_vol_args {
+ __s64 fd;
+ char name[BTRFS_PATH_NAME_MAX + 1];
+};
+
+struct btrfs_ioctl_search_key {
+ /* which root are we searching. 0 is the tree of tree roots */
+ __u64 tree_id;
+
+ /* keys returned will be >= min and <= max */
+ __u64 min_objectid;
+ __u64 max_objectid;
+
+ /* keys returned will be >= min and <= max */
+ __u64 min_offset;
+ __u64 max_offset;
+
+ /* max and min...
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix file descriptors leak
...extlinux/main.c
@@ -580,6 +580,7 @@ int ext2_fat_install_file(const char *path, int devfd, struct stat *rst)
goto bail;
}
+ close(fd);
free(file);
free(oldfile);
free(c32file);
@@ -778,7 +779,7 @@ static char * get_default_subvol(char * rootdir, char * subvol)
struct btrfs_ioctl_search_key *sk = &args.key;
struct btrfs_ioctl_search_header *sh;
int ret, i;
- int fd;
+ int fd = -1;
struct btrfs_root_ref *ref;
struct btrfs_dir_item *dir_item;
unsigned long off = 0;
@@ -797,6 +798,8 @@ static char * get_default_subvol(char * rootdir, char * subvol)...
2010 Dec 11
1
[RFC] Improve btrfs subvolume find-new command
...nd_updated_files(int fd, u64 root_id, u64 oldest_gen)
+BTRFS_SETGET_STACK_FUNCS(stack_inode_nbyte,
+ struct btrfs_inode_item, nbytes, 32);
+int print_one_inode(struct btrfs_inode_item *item,
+ u64 found_gen)
{
- int ret;
- struct btrfs_ioctl_search_args args;
- struct btrfs_ioctl_search_key *sk = &args.key;
+ u32 mode;
+
+ mode = btrfs_stack_inode_mode(item);
+ printf("\tINODE: mode 0x%08x gen %llu nbyte %llu nlink %llu uid %llu"
+ " gid %llu flags 0x%016llx\n",
+ mode, found_gen,
+ (unsigned long long)btrfs_stack_inode_nbyte(item),
+ (unsigned l...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...+++++++++++++-----------------
1 file changed, 33 insertions(+), 17 deletions(-)
diff --git a/extlinux/main.c b/extlinux/main.c
index bc7ded3..74f8d1f 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -779,7 +779,7 @@ static char * get_default_subvol(char * rootdir, char * subvol)
struct btrfs_ioctl_search_key *sk = &args.key;
struct btrfs_ioctl_search_header *sh;
int ret, i;
- int fd;
+ int fd = -1;
struct btrfs_root_ref *ref;
struct btrfs_dir_item *dir_item;
unsigned long off = 0;
@@ -1044,12 +1044,12 @@ err:
}
#ifndef __KLIBC__
-static const char *find_device(con...
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)
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
2012 Feb 03
10
[PATCH 0/3] Btrfs-progs: restriper interface
Hello,
This is the userspace part of restriper, rebased onto the new progs
infrastructure. Restriper commands are located under ''balance'' prefix,
which is now the top level command group. However to not confuse
existing users ''balance'' prefix is also available under ''filesystem'':
btrfs [filesystem] balance start
btrfs [filesystem] balance
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"
-