btrfsprogs/0054-btrfs-progs-don-t-have-to-report-ENOMEDIUM-error-dur.patch
Tomáš Chvátal 5be20c4ea7 Accepting request 205320 from home:dsterba:branches:filesystems
SR: a few fixes, aimed for 13.1 RC2

- fsck updates
- more mkfs sanity checks
- qgroup rescan wait

OBS-URL: https://build.opensuse.org/request/show/205320
OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=144
2013-10-31 09:12:04 +00:00

37 lines
1.0 KiB
Diff

From 3b167f3ea4e8b8ea292326924653d8862114626e Mon Sep 17 00:00:00 2001
From: Anand Jain <anand.jain@oracle.com>
Date: Fri, 26 Jul 2013 01:35:30 +0800
Subject: [PATCH 54/62] btrfs-progs: don't have to report ENOMEDIUM error
during open
when we scan /proc/partitions the cdrom is scanned
as well, and we don't have to report ENOMEDIUM errors
against it.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
---
utils.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/utils.c b/utils.c
index be0bfd5ecac2..6c1a96f2032f 100644
--- a/utils.c
+++ b/utils.c
@@ -1414,8 +1414,9 @@ scan_again:
fd = open(fullpath, O_RDONLY);
if (fd < 0) {
- fprintf(stderr, "failed to open %s: %s\n",
- fullpath, strerror(errno));
+ if (errno != ENOMEDIUM)
+ fprintf(stderr, "failed to open %s: %s\n",
+ fullpath, strerror(errno));
continue;
}
ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices,
--
1.8.3.1