search for: dirstream

Displaying 9 results from an estimated 9 matches for "dirstream".

Did you mean: virstream
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
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...path, &st); + if(res < 0 ) + return -1; + + return (st.st_ino == 256) && S_ISDIR(st.st_mode); + +} + +/* + * Get file handle for a file or dir + */ +static int open_file_or_dir(const char *fname) +{ + int ret; + struct stat st; + DIR *dirstream; + int fd; + + ret = stat(fname, &st); + if (ret < 0) { + return -1; + } + if (S_ISDIR(st.st_mode)) { + dirstream = opendir(fname); + if (!dirstream) { + return -2; + } +...
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
2013 Oct 25
8
[PATCH] btrfs: add framework to read fs info from btrfs-control
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs info through the btrfs-control Signed-off-by: Anand Jain <anand.jain@oracle.com> --- fs/btrfs/super.c | 47 ++++++++++++++++++++++++++++++++++++++----- fs/btrfs/volumes.c | 33 ++++++++++++++++++++++++++++++ fs/btrfs/volumes.h | 2 + include/uapi/linux/btrfs.h | 19 +++++++++++++++++ 4 files changed,
2013 Aug 20
7
[PATCH] btrfs-progs: use btrfs error code for kernel errors
...et = 1; } } diff --git a/cmds-filesystem.c b/cmds-filesystem.c index e78b95c..239bd3b 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -575,10 +575,14 @@ static int cmd_resize(int argc, char **argv) res = ioctl(fd, BTRFS_IOC_RESIZE, &args); e = errno; close_file_or_dir(fd, dirstream); - if( res < 0 ){ + if (res < 0) { fprintf(stderr, "ERROR: unable to resize ''%s'' - %s\n", path, strerror(e)); return 30; + } else if (res > 0) { + fprintf(stderr, "ERROR: resize failed - %s\n", + btrfs_err_str(res)); + return res; }...
2013 Dec 02
0
[PATCH] Btrfs-progs: add option to skip whether a scrub has started/resumed in userspace
...n/btrfs.8.in | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cmds-scrub.c b/cmds-scrub.c index 605af45..9f614bc 100644 --- a/cmds-scrub.c +++ b/cmds-scrub.c @@ -1096,9 +1096,10 @@ static int scrub_start(int argc, char **argv, int resume) void *terr; u64 devid; DIR *dirstream = NULL; + int force = 0; optind = 1; - while ((c = getopt(argc, argv, "BdqrRc:n:")) != -1) { + while ((c = getopt(argc, argv, "BdqrRc:n:f")) != -1) { switch (c) { case ''B'': do_background = 0; @@ -1123,6 +1124,9 @@ static int scrub_start(int argc,...
2013 Dec 02
3
[PATCH 1/3] btrfs-progs: Turning ON incompat isn't an error
Signed-off-by: Anand Jain <anand.jain@oracle.com> --- mkfs.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/mkfs.c b/mkfs.c index de1beed..0843600 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1196,8 +1196,7 @@ static void process_fs_features(u64 flags) for (i = 0; i < ARRAY_SIZE(mkfs_features); i++) { if (flags & mkfs_features[i].flag) { - fprintf(stderr,
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
2013 Nov 16
16
[PATCH] BTRFS-PROG: recursively subvolume snapshot and delete
Hi All, the following patches implement the recursively snapshotting and deleting of a subvolume. To snapshot recursively you must pass the -R switch: # btrfs subvolume create sub1 Create subvolume ''./sub1'' # btrfs subvolume create sub1/sub2 Create subvolume ''sub1/sub2'' # btrfs subvolume snapshot -R sub1 sub1-snap Create a snapshot of