[PATCH 2/7] libmutipath: Retain device size if sysfs_get_size fails.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When paths are allocated their size is initialized to 0. If they've
already set a size, and a future call to sysfs_get_size() fails during
the parsing, assume that the size hasn't changed, instead of setting it
to 0. All other failures in sysfs_get_size() already retain the existing
size.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 libmultipath/sysfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c
index c45296af..ad3d6612 100644
--- a/libmultipath/sysfs.c
+++ b/libmultipath/sysfs.c
@@ -175,7 +175,6 @@ sysfs_get_size (struct path *pp, unsigned long long * size)
 
 	if (r != 1) {
 		condlog(3, "%s: Cannot parse size attribute", pp->dev);
-		*size = 0;
 		return 1;
 	}
 
-- 
2.41.0





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux