[OpenAFS-devel] Byte-range Locking in Linux CM (Implements Nathan Neulinger Proposal, Linux)

Neulinger, Nathan nneul@umr.edu
Tue, 5 Apr 2005 16:17:53 -0500


What I determined when I was fiddling with this - in order to have it
work for all the cases, you would somehow need to have the kernel code
block the process, but release the glock() so that it could continue to
handle other processes, and come back to the one requesting the byte
range lock.

Since byte range locks are currently always granted, I think it would be
acceptable to increase functionality in the direction of having byte
range locks on unix without wait functionality.

However, something to consider - implementing the functionality above
would likely require more code in the afs kernel module, and less use of
the kernel specific stuff - which might let you implement this in a
platform (well, at least unix-like) independent manner, so that all unix
like systems would gain the functionality.=20

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-6679
UMR Information Technology             Fax: (573) 341-4216
=20

> -----Original Message-----
> From: Matt Benjamin [mailto:matt@linuxbox.com]=20
> Sent: Tuesday, April 05, 2005 4:08 PM
> To: Neulinger, Nathan
> Cc: openafs-devel@openafs.org
> Subject: Re: [OpenAFS-devel] Byte-range Locking in Linux CM=20
> (Implements Nathan Neulinger Proposal, Linux)
>=20
> Nathan,
>=20
> I would agree.  I'll add a test case and work on it further.
>=20
> Matt
>=20
> Neulinger, Nathan wrote:
>=20
> >Ok. I would be concerned about adding that patch as-is=20
> without further
> >study as it reduces current functionality in the case of whole-file
> >locks. That seems dangerous to me.
> >
> >-- Nathan
> >
> >------------------------------------------------------------
> >Nathan Neulinger                       EMail:  nneul@umr.edu
> >University of Missouri - Rolla         Phone: (573) 341-6679
> >UMR Information Technology             Fax: (573) 341-4216
> >=20
> >
> > =20
> >
> >>-----Original Message-----
> >>From: Matt Benjamin [mailto:matt@linuxbox.com]=20
> >>Sent: Tuesday, April 05, 2005 3:44 PM
> >>To: Neulinger, Nathan
> >>Cc: openafs-devel@openafs.org
> >>Subject: Re: [OpenAFS-devel] Byte-range Locking in Linux CM=20
> >>(Implements Nathan Neulinger Proposal, Linux)
> >>
> >>Nathan,
> >>
> >>At present, the client is not blocked, the behavior is as if=20
> >>the command=20
> >>was F_SETLK/64.
> >>
> >>Matt
> >>
> >>Neulinger, Nathan wrote:
> >>
> >>   =20
> >>
> >>>Neat trick using the posix_lock_file routine...=20
> >>>
> >>>One concern - does it properly handle a lock that has requested
> >>>blocking? i.e. SETLKW?
> >>>
> >>>I don't see that flag anywhere in the code... And=20
> >>>     =20
> >>>
> >>importantly - does it
> >>   =20
> >>
> >>>actually block just that one process when that single lock=20
> >>>     =20
> >>>
> >>is requested?
> >>   =20
> >>
> >>>That was one of the tricky spots that I got into when I=20
> >>>     =20
> >>>
> >>started fiddling
> >>   =20
> >>
> >>>with the idea.
> >>>
> >>>-- Nathan
> >>>
> >>>------------------------------------------------------------
> >>>Nathan Neulinger                       EMail:  nneul@umr.edu
> >>>University of Missouri - Rolla         Phone: (573) 341-6679
> >>>UMR Information Technology             Fax: (573) 341-4216
> >>>
> >>>
> >>>=20
> >>>
> >>>     =20
> >>>
> >>>>-----Original Message-----
> >>>>From: openafs-devel-admin@openafs.org=20
> >>>>[mailto:openafs-devel-admin@openafs.org] On Behalf Of=20
> Matt Benjamin
> >>>>Sent: Tuesday, April 05, 2005 3:19 PM
> >>>>To: openafs-devel@openafs.org; openafs-bugs@openafs.org
> >>>>Subject: [OpenAFS-devel] Byte-range Locking in Linux CM=20
> >>>>(Implements Nathan Neulinger Proposal, Linux)
> >>>>
> >>>>AFS Folk,
> >>>>
> >>>>Jhutz has reviewed--he at least agrees the code likely=20
> does what is=20
> >>>>intended, which is to implement Nathan Neulinger's=20
> locking proposal=20
> >>>>phase 1, where a CM implements local byte-range locking,=20
> >>>>       =20
> >>>>
> >>and shadows=20
> >>   =20
> >>
> >>>>such locks with whole-file locks on the AFS fileservers. =20
> >>>>Posting to dev=20
> >>>>and bugs, per Jeff.
> >>>>
> >>>>Change is confined to osi_vnodeops.c, except for a=20
> >>>>preprocessor define=20
> >>>>in afs_vnop_flock.c (which would presumably get switched on=20
> >>>>somehow or=20
> >>>>other).
> >>>>
> >>>>Patch is against 1.3.80.
> >>>>
> >>>>Matt
> >>>>
> >>>>
> >>>>  =20
> >>>>
> >>>>       =20
> >>>>
> >>>_______________________________________________
> >>>OpenAFS-devel mailing list
> >>>OpenAFS-devel@openafs.org
> >>>https://lists.openafs.org/mailman/listinfo/openafs-devel
> >>>
> >>>=20
> >>>
> >>>     =20
> >>>
> >>
> >>   =20
> >>
> >
> > =20
> >
>=20
>=20
>=20