Re: [RFC Patch 2/3] libmultipath: make sysfs_is_multipathed able to return wwid

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

 



On Tue, Mar 31, 2020 at 01:06:01PM +0000, Martin Wilck wrote:
> On Mon, 2020-03-30 at 21:00 -0500, Benjamin Marzinski wrote:
> > @@ -342,9 +342,25 @@ bool sysfs_is_multipathed(const struct path *pp)
> >  		if (nr == sizeof(uuid) && !memcmp(uuid, "mpath-",
> > sizeof(uuid)))
> >  			found = true;
> >  		else if (nr < 0) {
> > -			condlog(1, "%s: error reading from %s: %s",
> > -				__func__, pathbuf, strerror(errno));
> > +			condlog(1, "%s: error reading from %s: %m",
> > +				__func__, pathbuf);
> >  		}
> > +		if (found && set_wwid) {
> > +			nr = read(fd, pp->wwid, WWID_SIZE);
> 
> I'd rather read the whole UUID in a single syscall (i.e. merge this
> with the previous read() that fetched the first 6 chars).

Sure.

-Ben

> Regards,
> Martin
> 
> 
> -- 
> Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
> SUSE  Software Solutions Germany GmbH
> HRB 36809, AG Nürnberg GF: Felix
> Imendörffer
> 

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel





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

  Powered by Linux