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

Re: [libvirt] [PATCH v2 4/7] lockd_driver_lockd: Implement metadata flag



On Mon, Aug 20, 2018 at 09:25:13AM +0200, Michal Prívozník wrote:
> On 08/17/2018 01:53 AM, John Ferlan wrote:
> > 
> > 
> > On 08/14/2018 07:19 AM, Michal Privoznik wrote:
> >> Signed-off-by: Michal Privoznik <mprivozn redhat com>
> >> ---
> >>  src/locking/lock_daemon_dispatch.c | 12 ++++++++++--
> >>  src/locking/lock_driver_lockd.c    | 31 +++++++++++++++++++++----------
> >>  src/locking/lock_driver_lockd.h    |  1 +
> >>  3 files changed, 32 insertions(+), 12 deletions(-)
> >>
> >> diff --git a/src/locking/lock_daemon_dispatch.c b/src/locking/lock_daemon_dispatch.c
> >> index 10248ec0b5..c24571ceac 100644
> >> --- a/src/locking/lock_daemon_dispatch.c
> >> +++ b/src/locking/lock_daemon_dispatch.c
> >> @@ -37,6 +37,9 @@ VIR_LOG_INIT("locking.lock_daemon_dispatch");
> >>  
> >>  #include "lock_daemon_dispatch_stubs.h"
> >>  
> >> +#define DEFAULT_OFFSET 0
> >> +#define METADATA_OFFSET 1
> >> +
> > 
> > Curious, does this lead to the prospect of being able to acquire/use
> > offset==0 length==1 and offset==1 length==1 at least conceptually and
> > granularity wise?
> 
> Yes, this is exactly the purpose. I've taken inspiration from qemu. They
> lock bytes from 100 to 100 + N, depending on what operations they want
> the disk for (checkout raw_apply_lock_bytes() form block/file-posix.c).
> And my idea was for virtlockd to do the same. Currently, it locks 0th
> byte of given file and with metadata flag it would lock the first one.

Agreed, NFSv3 is already doomed, and this barely makes it worse because
of the short lock time. NFSv4 is the fix for anyone who really cares.

Better to have stale NFSv3 locks due to dead clients not releasing locks
than to loose all your VM disk due to corruption.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


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