[libvirt] [PATCHv4 7/8] storage: improve handling of symlinks in gluster

Eric Blake eblake at redhat.com
Mon Nov 25 19:54:17 UTC 2013


On 11/25/2013 08:57 AM, Daniel P. Berrange wrote:
> On Fri, Nov 22, 2013 at 08:20:29PM -0700, Eric Blake wrote:
>> With this patch, dangling and looping symlinks are silently
>> ignored, while links to files and directories are treated the
>> same as the underlying file or directory.  This is the same
>> behavior as both 'directory' and 'netfs' pools.
>>
>> * src/storage/storage_backend_gluster.c
>> (virStorageBackendGlusterRefreshVol): Treat symlinks similar to
>> directory and netfs pools.
>>
>> Signed-off-by: Eric Blake <eblake at redhat.com>
>> ---
>>  src/storage/storage_backend_gluster.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
> 
> ACK

Since I just added 'netdir' volume types, I'm wondering if I should also
add a 'badlink' volume type (covers both ENOENT and ELOOP errors).
After all, in a directory pool, you cannot create a new file with a name
occupied by a bad link without first deleting the bad link; and our
current behavior of silently ignoring bad links is a little unfriendly
when compared with actually telling the user that they have a broken
symlink, and without a way to use libvirt API to get the broken link out
of the way (you can't delete something that is silently ignored).  But
that would be a followup patch, particularly since it affects directory
(and not just gluster) pools.

I've pushed this one as-is.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131125/94232dc9/attachment-0001.sig>


More information about the libvir-list mailing list