search for: run_ioctl

Displaying 5 results from an estimated 5 matches for "run_ioctl".

2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
...e <limits.h> +#include <ctype.h> +#include <fnmatch.h> #include "kerncompat.h" #include "radix-tree.h" #include "ctree.h" @@ -833,7 +835,185 @@ void btrfs_register_one_device(char *fname) close(fd); } -int btrfs_scan_one_dir(char *dirname, int run_ioctl) + +static char **device_checklist = 0; +static int device_checklist_count = 0; +/* + * Default device black list: + * If the line starts with a "!" the device has to be skipped + * otherwise the device is OK + */ +static char *default_checklist[] = { + "!/dev/fd*", + "!/d...
2012 Oct 24
2
[BUG][PATCH][BTRFS-PROGS] Bug overflow fix
...ll - terminated. Signed-off-by: Rock Lee <zimilo@code-trick.com> --- utils.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.c b/utils.c index 3c88d2e..7200aef 100644 --- a/utils.c +++ b/utils.c @@ -969,7 +969,7 @@ int btrfs_scan_one_dir(char *dirname, int run_ioctl) pending = malloc(sizeof(*pending)); if (!pending) return -ENOMEM; - strcpy(pending->name, dirname); + snprintf(pending->name, sizeof(pending->name), "%s", dirname); again: dirname_len = strlen(pending->name); @@ -1010,7 +1010,8 @@ again: ret = -ENOMEM; go...
2013 Mar 21
4
[PATCH] btrfs-progs: make btrfs dev scan multi path aware
...d to read %s: %s\n", fullpath, strerror(errno)); continue; } + close(fd); + + fd = open(fullpath, O_RDONLY); ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices, &num_devices, BTRFS_SUPER_INFO_OFFSET); + close(fd); + if (ret == 0 && run_ioctl > 0) { btrfs_register_one_device(fullpath); } - close(fd); } if (!list_empty(&pending_list)) { free(pending); @@ -1442,19 +1449,29 @@ scan_again: continue; } - fd = open(fullpath, O_RDONLY); + /* This will fail for the multi path devices + * when non multipath path...
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
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" -