search for: tmp_devic

Displaying 3 results from an estimated 3 matches for "tmp_devic".

Did you mean: tmp_devid
2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
...h, skip the device */ + rule++; + }else{ + res = 1; /* if match, the device is ok */ + } + + if( !fnmatch(rule, dev, 0 ) ) + return res; + + } + return 1; +} + +int btrfs_scan_block_devices(int run_ioctl, int checklist) +{ + + struct stat st; + int ret; + int fd; + struct btrfs_fs_devices *tmp_devices; + u64 num_devices; + FILE *proc_partitions; + int i; + char buf[1024]; + char name[100], fullpath[110]; + + if(checklist) + init_device_checklist(BTRFSDEVICELIST); + + proc_partitions = fopen("/proc/partitions","r"); + if (!proc_partitions) { + fprintf(stderr, "Unable...
2013 Mar 21
4
[PATCH] btrfs-progs: make btrfs dev scan multi path aware
...) + if(errno != ENXIO && errno != ENOMEDIUM && + errno != EBUSY) fprintf(stderr, "failed 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: continu...
2009 Aug 26
0
btrfsctl -a doesn't find my btrfs
...ing for Btrfs filesystems failed to read /dev/sr0 I''m using btrfs-progs-unstable version 4f89b6eb0718ade63152791db32794da78fbba70. Am I doing something wrong or misinterpreting how btrfsctl works? I notice that "-a" does a: ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices, &num_devices, BTRFS_SUPER_INFO_OFFSET); Whereas "-A" does a: fd = open("/dev/btrfs-control", O_RDWR); if (fd < 0) { perror("failed to open /dev/btrfs-control"); exit(1); } Followed by a: ret = ioctl(fd, BTRFS_...