Displaying 9 results from an estimated 9 matches for "btrfs_vol_name_max".
2009 Jan 19
4
[Patch] Btrfs: use BTRFS_VOL_NAME_MAX for struct btrfs_ioctl_vol_args
I found userspace tool, btrfsctl, uses BTRFS_VOL_NAME_MAX, and
it also looks that this one is more proper.
Kill BTRFS_PATH_NAME_MAX since no one will use it.
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Chris Mason <chris.mason@oracle.com>
---
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index c2aa33e..f229950 100644
--- a/fs/btrfs...
2007 Sep 20
0
[patch]use strnlen to deal with string from user space
.../inode.c Mon Sep 17 11:25:58 2007 -0400
+++ b/inode.c Thu Sep 20 22:25:34 2007 +0800
@@ -1985,7 +1988,7 @@ static int btrfs_ioctl_snap_create(struc
if (copy_from_user(&vol_args, arg, sizeof(vol_args)))
return -EFAULT;
- namelen = strlen(vol_args.name);
+ namelen = strnlen(vol_args.name, BTRFS_VOL_NAME_MAX + 1);
if (namelen > BTRFS_VOL_NAME_MAX)
return -EINVAL;
if (strchr(vol_args.name, '/'))
2008 Jun 30
0
[PATCH] Null terminate strings passed in from userspace
...74 -r be405df89141 ioctl.c
--- a/ioctl.c Thu Jun 26 10:34:20 2008 -0400
+++ b/ioctl.c Mon Jun 30 15:37:34 2008 -0700
@@ -301,11 +301,9 @@
ret = -EFAULT;
goto out;
}
+
+ vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0'';
namelen = strlen(vol_args->name);
- if (namelen > BTRFS_VOL_NAME_MAX) {
- ret = -EINVAL;
- goto out;
- }
mutex_lock(&root->fs_info->alloc_mutex);
mutex_lock(&root->fs_info->chunk_mutex);
@@ -405,11 +403,8 @@
goto out;
}
+ vol_args->name[BTRFS_PATH_NAME_MAX] = ''\0'';
namelen = strlen(vol_args->name);
- if (n...
2012 Feb 29
15
[RFC] [PATCH] Add btrfs autosnap feature
From: anand jain <anand.jain@oracle.com>
Anand Jain (1):
[RFC] Add btrfs autosnap feature
Makefile | 6 +-
autosnap.c | 1553 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
autosnap.h | 81 +++
btrfs-list.c | 140 +++++-
btrfs.c | 46 ++-
btrfs_cmds.c | 186 +++++++-
btrfs_cmds.h | 3 +-
scrub.c | 1 +
8 files changed, 1982 insertions(+), 34
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...e;
+} __attribute__ ((__packed__));
+
struct btrfs_super_block {
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 */...
2013 Aug 14
23
[RFC] btrfs-progs: fix sparse checking and warnings
Hi gang,
I was a little surprised to see that patch go by recently
which fixed an endian bug. I went to see how sparse
checking looked and it was.. broken. I got it going
again in my Fedora environment.
Most of the patches are just cleanups, but there *were*
three real bugs lurking in all that sparse warning spam.
So I maintain that it''s worth our time to keep it going
and fix
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.
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"
-
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)