Displaying 20 results from an estimated 29 matches for "btrfs_ioctl_vol_arg".
Did you mean:
btrfs_ioctl_vol_args
2009 Jan 19
4
[Patch] Btrfs: use BTRFS_VOL_NAME_MAX for struct btrfs_ioctl_vol_args
...->name);
out:
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index b320b10..f5d182a 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -22,12 +22,10 @@
#define BTRFS_IOCTL_MAGIC 0x94
#define BTRFS_VOL_NAME_MAX 255
-#define BTRFS_PATH_NAME_MAX 4087
-/* this should be 4k */
struct btrfs_ioctl_vol_args {
__s64 fd;
- char name[BTRFS_PATH_NAME_MAX + 1];
+ char name[BTRFS_VOL_NAME_MAX + 1];
};
struct btrfs_ioctl_clone_range_args {
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index db9fb3b..5facdbf 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -593,7 +593,7 @@ static long btrfs_c...
2013 Oct 25
8
[PATCH] btrfs: add framework to read fs info from btrfs-control
...+
+ if (copy_to_user(arg, fslist_arg, sz_fslist_arg + sz_fslist))
+ ret = -EFAULT;
+
+ kfree(fslist_arg);
+ return ret;
+}
+
/*
* used by btrfsctl to scan devices when no FS is mounted
*/
static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
- struct btrfs_ioctl_vol_args *vol;
+ struct btrfs_ioctl_vol_args *vol = NULL;
struct btrfs_fs_devices *fs_devices;
int ret = -ENOTTY;
+ void __user *argp = (void __user *)arg;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- vol = memdup_user((void __user *)arg, sizeof(*vol));
- if (IS_ERR(vol))
- return PTR_ERR(vo...
2010 Mar 22
5
[PATCH 0/5] asynchronous commit, snapshot ponies
Hi everyone,
This patchset is the latest approach I''m using for the Ceph storage daemon to
keep track of which data has safely committed to disk. The basic idea is to
not use the (problematic) user transaction ioctls at all. Instead, the daemon
quiesces its own write requests, initiates an async snapshot, and then
continues.
The snapshot approach is nice because it provides rollback.
2008 Jun 30
0
[PATCH] Null terminate strings passed in from userspace
The ''char name[BTRFS_PATH_NAME_MAX]'' member of struct btrfs_ioctl_vol_args
is passed directly to strlen() after being copied from user. I haven''t
verified this, but in theory a userspace program could pass in an
unterminated string and cause a kernel crash as strlen walks off the end of
the array.
This patch terminates the ->name string in all btrfs ioctl fu...
2009 Jun 13
1
[PATCH 1/3] Add ioctl to set per file 'compress' flag
...newformat2/fs/btrfs/ioctl.h
===================================================================
--- newformat2.orig/fs/btrfs/ioctl.h
+++ newformat2/fs/btrfs/ioctl.h
@@ -65,5 +65,7 @@ struct btrfs_ioctl_clone_range_args {
#define BTRFS_IOC_SUBVOL_CREATE _IOW(BTRFS_IOCTL_MAGIC, 14, \
struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_COMPRESS _IOW(BTRFS_IOCTL_MAGIC, 15, \
+ struct btrfs_ioctl_vol_args)
#endif
--
May the source be with you.
http://www.cis.ksu.edu/~gud
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kerne...
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
Memory leaks found by the tool--valgrind along with static reviewing.
Based on Daivd''s branch ''integration-20130903''.
Gui Hecheng (5):
btrfs-progs:free local variable buf upon unsuccessful returns
btrfs-progs:local variable memory freed
btrfs-progs: missing tree-freeing statements added
btrfs-progs:free the local list pending_list in btrfs_scan_one_dir
2010 Oct 25
14
[PATCH 0/6] Btrfs commit fixes, async subvol operations
Hi Chris,
This is the extent of my current queue of Btrfs snapshot/subvol/commit
stuff. Most of these were posted several months ago. Can be sent
upstream during this merge window? Not having this functionality is
becoming a bit of a roadblock for our efforts to keep the Ceph data in a
consistent state.
These patches are also available from
2010 Dec 14
0
[PATCH] BTRFS_IOC_TREE_SEARCH: store and use the last key found
...to 64 bits */
- __u32 unused;
+ /* starting search key fields */
+ __u32 start_type;
+ __u64 start_objectid;
+ __u64 start_offset;
/* some extra for later */
- __u64 unused1;
- __u64 unused2;
__u64 unused3;
__u64 unused4;
};
@@ -182,7 +182,12 @@ struct btrfs_ioctl_space_args {
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_DEFRAG_RANGE _IOW(BTRFS_IOCTL_MAGIC, 16, \
struct btrfs_ioctl_defrag_range_args)
-#define BTRFS_IOC_TREE_SEARCH _IOWR(BTRFS_IOCTL_MAGIC, 17, \
+
+/* buggy, don''t use */
+
+#define BTRFS_IOC_TREE_SEARCH_V0 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
+ struct btrfs_ioctl_s...
2011 Feb 07
18
[PATCH] Btrfs-progs use safe string manipulation functions
Please find the attached patch which replace unsafe strcpy(3) by
strncpy(3) functions.
regards,
Eduardo Silva
2009 Nov 10
12
[RFC] big fat transaction ioctl
...rn 0;
+ case BTRFS_IOC_USERTRANS:
+ return btrfs_ioctl_usertrans(file, argp);
}
return -ENOTTY;
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index bc49914..f94e293 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -67,4 +67,53 @@ struct btrfs_ioctl_clone_range_args {
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_SNAP_DESTROY _IOW(BTRFS_IOCTL_MAGIC, 15, \
struct btrfs_ioctl_vol_args)
+
+/* usertrans ops */
+/* the ''fd'' values are _indices_ into a temporary fd table, see num_fds below */
+#define BTRFS_IOC_UT_OP_OPEN 1 /* path, flags, mode, fd */
+#define...
2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
..._scan_block_devices(1, checklist);
if (ret){
fprintf(stderr, "ERROR: error %d while scanning\n",
ret);
return 18;
@@ -547,7 +561,7 @@ int do_scan(int argc, char **argv)
return 10;
}
- for( i = 1 ; i < argc ; i++ ){
+ for( i = devstart ; i < argc ; i++ ){
struct btrfs_ioctl_vol_args args;
int ret;
@@ -666,15 +680,30 @@ int do_show_filesystem(int argc, char **argv)
struct list_head *all_uuids;
struct btrfs_fs_devices *fs_devices;
struct list_head *cur_uuid;
- char *search = argv[1];
+ char *search=0;
int ret;
+ int checklist = 1;
+ int searchstart = 1;
- ret = b...
2013 Mar 21
4
[PATCH] btrfs-progs: make btrfs dev scan multi path aware
...uot;done\n");
return 0;
}
- fd = open("/dev/btrfs-control", O_RDWR);
- if (fd < 0) {
- perror("failed to open /dev/btrfs-control");
- return 10;
- }
-
+ printf("Scanning for Btrfs in\n");
for( i = devstart ; i < argc ; i++ ){
+ int fdt;
struct btrfs_ioctl_vol_args args;
- int ret;
+ printf(" %s ", argv[i]);
+ fflush(stdout);
- printf("Scanning for Btrfs filesystems in ''%s''\n", argv[i]);
+ /*
+ * If for a multipath (mp) disk user provides the
+ * non-mp path then open with flag O_EXCL will fail,
+ * (also i...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...unsigned char csum[BTRFS_CSUM_SIZE];
/* the first 3 fields must match struct btrfs_header */
@@ -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 wil...
2011 Jan 06
3
Offline Deduplication for Btrfs V2
Just a quick update, I''ve dropped the hashing stuff in favor of doing a memcmp
in the kernel to make sure the data is still the same. The thing that takes a
while is reading the data up from disk, so doing a memcmp of the entire buffer
isn''t that big of a deal, not to mention there''s a possiblity for malicious
users if there is a problem with the hashing algorithms we
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
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
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found
the very last bug in my current scrub patch series:
Changelog v4->v5:
- fixed a deadlock when fixup is taking longer while scrub is about to end
Original message follows:
------------------------
This patch set introduces two new features for scrub. They share the backref
iteration code which is the
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
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)
2010 Sep 28
18
[PATCH] Btrfs: add a disk info ioctl to get the disks attached to a filesystem
...s/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -138,6 +138,11 @@ struct btrfs_ioctl_space_args {
struct btrfs_ioctl_space_info spaces[0];
};
+struct btrfs_ioctl_disk_info_args {
+ __u32 num_devices;
+ __u64 devices[0];
+};
+
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -178,4 +183,6 @@ struct btrfs_ioctl_space_args {
#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64)
#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
struct btrfs_ioctl_space_args)
+#define BTRFS_IOC_DIS...