[OpenAFS] Opening files read-only when another process has a
write-lock
Jeffrey Altman
jaltman@secure-endpoints.com
Fri, 18 Mar 2011 10:53:34 -0400
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigFA6A8EB6B3D1E938B4773CB2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On 3/18/2011 9:29 AM, Thomas Smith wrote:
> Hi,
>=20
> Is it possible to open files read-only when another process has a
> write-lock? I found the following information regarding 1.5.20.
>=20
> http://dl.openafs.org/dl/openafs/1.5.20/winxp/relnotes.htm
The release notes for the version of the OpenAFS client that is
installed on the machine in question is available locally
Start->Programs->OpenAFS->Documentation->Release Notes
> Many applications on Windows (e.g. Microsoft Office) require
> the use of byte range locks
> applied to a file either to protect against simultaneous file
> access or as a signaling mechanism.
> OpenAFS for Windows release 1.5 (or greater) implements byte
> range locking within the
> CIFS-AFS gateway server. This support for byte range locking
> obtains AFS=E2=80=99 advisory file
> server locks to simulate Microsoft Windows mandatory locks.
> When an application opens
> a file, a lock will be obtained from AFS indicating that the
> file is in use. If the lock is a write
> lock, access to the file will be restricted to other
> applications running on the same machine
> as the first application to request the lock. Applications
> running on other machines will see
> the AFS full file lock and will be unable to access the file.
>=20
> Just wasn't sure if this is the current state things.
It is.
> I'm on 1.4.12 on the server and 1.5.78 on the client.
>=20
> This issue arose when one of my users was editing a spreadsheet and
> another user attempted to open the same spreadsheet for viewing--the
> attempted viewer received an error indicating that the file was
> locked.
As described above, Microsoft Office applications use byte range locks
as a form of signaling. When an Office application requests a file be
opened in read-only mode it obtains a shared byte-range lock on a
particular section of the file. That permits other instances of Office
on the network to know that the file is open for read-only use and it
should not be changed.
This model works just fine on AFS if both instances are sitting behind
the same AFS cache manager since the cache manager can manage the byte
range lock allocations. However, it fails if the instances are on
different machines because the AFS file servers do not support
byte-range locking.
Jeffrey Altman
--------------enigFA6A8EB6B3D1E938B4773CB2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
iQEcBAEBAgAGBQJNg3HwAAoJENxm1CNJffh4D4UH/1g9ar0/XRPEunKnEfTX236I
A58vlS+HayL5ss7fykPtZvkzgPb/ya9zNam05+mHH95rprmPGBFQRvLfzqooRdZV
NHBE9nIDk05Pnjg6PITes6Udjk1l5oELXi3diQO7nw0biCgMv4RzFFnnhqmYo3FD
tjt+G/Bpg2PZZvLS6jSu4AWygzm0jEoMMPeIt/hmfn3MCLkSkxcvWAhFkI4aAwDy
95hDl6c+gR7BHE8RBBcj27rVjUeuwZs7I2XmgGD7FenZ8N7zZTdTToiBI1mHWf9H
TeFiY0UZz4lKCmp+2PycFxIYRX7mgzLQnpS0QKPoDlGAKBr1jm+t1HyEG3XD3BE=
=DRnr
-----END PGP SIGNATURE-----
--------------enigFA6A8EB6B3D1E938B4773CB2--