Displaying 8 results from an estimated 8 matches for "check_mounted".
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...buf_b.st_dev &&
+ st_buf_a.st_ino == st_buf_b.st_ino)
+ {
+ return 1;
+ }
+
+ return 0;
+}
+
/*
* returns 1 if the device was mounted, < 0 on error or 0 if everything
- * is safe to continue. TODO, this should also scan multi-device filesystems
+ * is safe to continue.
*/
int check_mounted(char *file)
{
struct mntent *mnt;
- struct stat st_buf;
- dev_t file_dev = 0;
- dev_t file_rdev = 0;
- ino_t file_ino = 0;
FILE *f;
int ret = 0;
- if ((f = setmntent ("/proc/mounts", "r")) == NULL)
- return -errno;
+ int loop_fd;
+ struct loop_info loopinfo;
- if (st...
2005 Jun 07
3
Error while creating domains
...ller.py", line 236, in createDevice
dev.attach(recreate=recreate, change=change)
File "/usr/lib/python/xen/xend/server/blkif.py", line 221, in attach
self.setNode(node)
File "/usr/lib/python/xen/xend/server/blkif.py", line 247, in setNode
mounted_mode = self.check_mounted(node)
File "/usr/lib/python/xen/xend/server/blkif.py", line 265, in check_mounted
mode = blkif.mount_mode(name)
File "/usr/lib/python/xen/util/blkif.py", line 73, in mount_mode
exp = re.compile(''^'' + name + '' .*[\(,]r(?P<mode>[ow])[,\...
2013 Feb 12
10
[PATCH] Btrfs-progs: check out if the swap device
...av)
if (source_dir == 0) {
file = av[optind++];
+ ret = is_swap_device(file);
+ if (ret < 0) {
+ fprintf(stderr, "error checking %s status\n", file);
+ exit(1);
+ }
+ if (ret == 1) {
+ fprintf(stderr, "%s is a swap device\n", file);
+ exit(1);
+ }
ret = check_mounted(file);
if (ret < 0) {
fprintf(stderr, "error checking %s mount status\n", file);
@@ -1461,6 +1470,15 @@ int main(int ac, char **av)
int old_mixed = mixed;
file = av[optind++];
+ ret = is_swap_device(file);
+ if (ret < 0) {
+ fprintf(stderr, "error checking %s...
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,
2011 Jul 18
5
[PATCH v3 0/5] btrfs-progs: scrub interface
...rs with "btrfs scrub status" while scrub is running
- effective locking to protect against multiple scrubs on a filesystem
- man page entry for scrub added
Change log v2->v3:
- unverified_errors counter added
- return code of utility now depends on detected disk errors
- bail out when check_mounted_where returns an error
- changes as suggested by Hugo Mill''s review. incomplete list:
- style (checkpatch is happy now)
- pthread_* error handling
- use /var/lib/btrfs instead of /var/btrfs for storing history
Attention: This version may be useful for Hugo, only. It is meant to be...
2011 Jan 22
32
Bug in mkfs.btrfs?!
Hi,
I wanted to create a new btrfs fs for my backups.
When trying to mkfs.btrfs for that device, I''m getting
"error checking /dev/loop2 mount status"
With strace I see where the problem is:
lstat("/dev/disk/by-id/ata-INTEL_SSDSA2M160G2GC_CVPO939201JX160AGN-par",
0x7fffa30b3cf0) = -1 ENOENT (No such file or directory)
The problem is there is something missing
2013 Jan 29
8
[RFC] Move btrfsck in to the btrfs command
NOTE: in order to apply this patch you should:
git mv btrfsck.c cmd-fsck.c
This patch moves btrfsck in to "btrfs fsck".
It also adds support for symlinks to the btrfs binary to
retain compablity, =)
I think something should be done to the help description but i''m not
sure what... Anyway, feedback is welcome.
--
To unsubscribe from this list: send the line "unsubscribe
2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
...6,8 +36,13 @@ int btrfs_scan_for_fsid(struct btrfs_fs_devices *fs_devices,
u64
total_devs,
int run_ioctls);
void btrfs_register_one_device(char *fname);
int btrfs_scan_one_dir(char *dirname, int run_ioctl);
+int btrfs_scan_one_dir_checklist(char *dirname, int run_ioctl, int checklist);
int check_mounted(const char *devicename);
int btrfs_device_already_in_root(struct btrfs_root *root, int fd,
int super_offset);
char *pretty_sizes(u64 size);
+int btrfs_scan_block_devices(int run_ioctl, int checklist);
+
+#define BTRFSDEVICELIST "/etc/btrfs.devices"
+
#endif
--
gpg key@ keyserv...