J. Bruce Fields <[EMAIL PROTECTED]> wrote:
> > Yes. I need to get the server lock first, before going to the VFS locking
> > routines.
>
> That doesn't really answer the question. The NFS client has similar
> requirements, but it doesn't have to duplicate the per-inode lists of
> granted
J. Bruce Fields [EMAIL PROTECTED] wrote:
Yes. I need to get the server lock first, before going to the VFS locking
routines.
That doesn't really answer the question. The NFS client has similar
requirements, but it doesn't have to duplicate the per-inode lists of
granted locks, for
On Wed, May 30, 2007 at 09:35:32AM +0100, David Howells wrote:
> J. Bruce Fields <[EMAIL PROTECTED]> wrote:
>
> > --without having tried to understand how they're actually used, these
> > data structures (like the pending_locks and granted_locks lists) seem to
> > duplicate stuff that's already
J. Bruce Fields <[EMAIL PROTECTED]> wrote:
> --without having tried to understand how they're actually used, these
> data structures (like the pending_locks and granted_locks lists) seem to
> duplicate stuff that's already kept in fs/locks.c. Is there a reason
> they're required?
Yes. I need
J. Bruce Fields [EMAIL PROTECTED] wrote:
--without having tried to understand how they're actually used, these
data structures (like the pending_locks and granted_locks lists) seem to
duplicate stuff that's already kept in fs/locks.c. Is there a reason
they're required?
Yes. I need to get
On Wed, May 30, 2007 at 09:35:32AM +0100, David Howells wrote:
J. Bruce Fields [EMAIL PROTECTED] wrote:
--without having tried to understand how they're actually used, these
data structures (like the pending_locks and granted_locks lists) seem to
duplicate stuff that's already kept in
One more vague question I had while skimming the previous version--
On Tue, May 29, 2007 at 03:54:27PM +0100, David Howells wrote:
> +static void afs_grant_locks(struct afs_vnode *vnode, struct file_lock *fl)
> +{
> + struct file_lock *p, *_p;
> +
> + list_move_tail(>fl_u.afs.link,
On Tue, May 29, 2007 at 10:34:41AM +0100, David Howells wrote:
> I'll need to test the upgrade/downgrade case. I don't know whether the AFS
> server supports that. If it doesn't, I can emulate downgrade, but not upgrade
> - not unless I only ever ask it for exclusive locks.
>
> Lock upgrading
Implement file locking for AFS.
[try #2]:
(*) Start the lock manager thread under a mutex to avoid a race.
(*) Made the locking non-fair: New readlocks will jump pending writelocks if
there's a readlock currently granted on a file. This makes the behaviour
similar to Linux's VFS
J. Bruce Fields <[EMAIL PROTECTED]> wrote:
> > At the moment, yes. Don't the POSIX and flock lock-handling routines in the
> > kernel normally do that anyway?
>
> No, they'd upgrade in that case.
I just checked. The OpenAFS server supports neither lock upgrading nor lock
downgrading.
J. Bruce Fields <[EMAIL PROTECTED]> wrote:
> You can contrive examples of applications that would be correct given
> the standard fcntl behavior, but that would deadlock on a system that
> didn't allow read locks to jump the queue in the above situation.
Yes, but you can also contrive starvation
J. Bruce Fields [EMAIL PROTECTED] wrote:
You can contrive examples of applications that would be correct given
the standard fcntl behavior, but that would deadlock on a system that
didn't allow read locks to jump the queue in the above situation.
Yes, but you can also contrive starvation if
J. Bruce Fields [EMAIL PROTECTED] wrote:
At the moment, yes. Don't the POSIX and flock lock-handling routines in the
kernel normally do that anyway?
No, they'd upgrade in that case.
I just checked. The OpenAFS server supports neither lock upgrading nor lock
downgrading. Attempts to do
Implement file locking for AFS.
[try #2]:
(*) Start the lock manager thread under a mutex to avoid a race.
(*) Made the locking non-fair: New readlocks will jump pending writelocks if
there's a readlock currently granted on a file. This makes the behaviour
similar to Linux's VFS
On Tue, May 29, 2007 at 10:34:41AM +0100, David Howells wrote:
I'll need to test the upgrade/downgrade case. I don't know whether the AFS
server supports that. If it doesn't, I can emulate downgrade, but not upgrade
- not unless I only ever ask it for exclusive locks.
Lock upgrading is
One more vague question I had while skimming the previous version--
On Tue, May 29, 2007 at 03:54:27PM +0100, David Howells wrote:
+static void afs_grant_locks(struct afs_vnode *vnode, struct file_lock *fl)
+{
+ struct file_lock *p, *_p;
+
+ list_move_tail(fl-fl_u.afs.link,
On Sun, May 27, 2007 at 09:51:10AM +0100, David Howells wrote:
> J. Bruce Fields <[EMAIL PROTECTED]> wrote:
> > So if I request a write lock while holding a read lock, my request will
> > be denied?
>
> At the moment, yes. Don't the POSIX and flock lock-handling routines in the
> kernel normally
J. Bruce Fields <[EMAIL PROTECTED]> wrote:
> > > Do you allow upgrades and downgrades? (Just curious.)
> >
> > AFS does not, as far as I know.
>
> So if I request a write lock while holding a read lock, my request will
> be denied?
At the moment, yes. Don't the POSIX and flock lock-handling
J. Bruce Fields [EMAIL PROTECTED] wrote:
Do you allow upgrades and downgrades? (Just curious.)
AFS does not, as far as I know.
So if I request a write lock while holding a read lock, my request will
be denied?
At the moment, yes. Don't the POSIX and flock lock-handling routines in
On Sun, May 27, 2007 at 09:51:10AM +0100, David Howells wrote:
J. Bruce Fields [EMAIL PROTECTED] wrote:
So if I request a write lock while holding a read lock, my request will
be denied?
At the moment, yes. Don't the POSIX and flock lock-handling routines in the
kernel normally do that
On Sun, May 27, 2007 at 12:55:30AM +0100, David Howells wrote:
> J. Bruce Fields <[EMAIL PROTECTED]> wrote:
>
> > > + if (!afs_lock_manager) {
> > > + afs_lock_manager = create_singlethread_workqueue("kafs_lockd");
> > > + if (!afs_lock_manager)
> > > + return
Kyle Moffett <[EMAIL PROTECTED]> wrote:
> I was actually under the impression that OpenAFS had support for byte-
> range locking (as well as lock upgrade/downgrade);
As far as I know, there is no support for byte-range locking at all in the AFS
protocol itself. The client can try to emulate
J. Bruce Fields <[EMAIL PROTECTED]> wrote:
> > + if (!afs_lock_manager) {
> > + afs_lock_manager = create_singlethread_workqueue("kafs_lockd");
> > + if (!afs_lock_manager)
> > + return -ENOMEM;
> > + }
> > + return 0;
>
> Doesn't this need some
J. Bruce Fields [EMAIL PROTECTED] wrote:
+ if (!afs_lock_manager) {
+ afs_lock_manager = create_singlethread_workqueue(kafs_lockd);
+ if (!afs_lock_manager)
+ return -ENOMEM;
+ }
+ return 0;
Doesn't this need some locking?
Oops. Yes.
Kyle Moffett [EMAIL PROTECTED] wrote:
I was actually under the impression that OpenAFS had support for byte-
range locking (as well as lock upgrade/downgrade);
As far as I know, there is no support for byte-range locking at all in the AFS
protocol itself. The client can try to emulate
On Sun, May 27, 2007 at 12:55:30AM +0100, David Howells wrote:
J. Bruce Fields [EMAIL PROTECTED] wrote:
+ if (!afs_lock_manager) {
+ afs_lock_manager = create_singlethread_workqueue(kafs_lockd);
+ if (!afs_lock_manager)
+ return -ENOMEM;
+ }
+
On May 25, 2007, at 22:23:42, J. Bruce Fields wrote:
On Thu, May 24, 2007 at 05:55:54PM +0100, David Howells wrote:
+ /* only whole-file locks are supported */
+ if (fl->fl_start != 0 || fl->fl_end != OFFSET_MAX)
+ return -EINVAL;
Do you allow upgrades and
On Thu, May 24, 2007 at 05:55:54PM +0100, David Howells wrote:
> +/*
> + * initialise the lock manager thread if it isn't already running
> + */
> +static int afs_init_lock_manager(void)
> +{
> + if (!afs_lock_manager) {
> + afs_lock_manager =
David Howells napsal(a):
> Implement file locking for AFS.
>
> Signed-off-by: David Howells <[EMAIL PROTECTED]>
> ---
>
> fs/afs/Makefile|1
> fs/afs/afs.h |8 +
> fs/afs/afs_fs.h|3
> fs/afs/callback.c |3
> fs/afs/dir.c |1
> fs/afs/file.c |
David Howells napsal(a):
Implement file locking for AFS.
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/afs/Makefile|1
fs/afs/afs.h |8 +
fs/afs/afs_fs.h|3
fs/afs/callback.c |3
fs/afs/dir.c |1
fs/afs/file.c |2
On Thu, May 24, 2007 at 05:55:54PM +0100, David Howells wrote:
+/*
+ * initialise the lock manager thread if it isn't already running
+ */
+static int afs_init_lock_manager(void)
+{
+ if (!afs_lock_manager) {
+ afs_lock_manager = create_singlethread_workqueue(kafs_lockd);
+
On May 25, 2007, at 22:23:42, J. Bruce Fields wrote:
On Thu, May 24, 2007 at 05:55:54PM +0100, David Howells wrote:
+ /* only whole-file locks are supported */
+ if (fl-fl_start != 0 || fl-fl_end != OFFSET_MAX)
+ return -EINVAL;
Do you allow upgrades and downgrades?
Implement file locking for AFS.
Signed-off-by: David Howells <[EMAIL PROTECTED]>
---
fs/afs/Makefile|1
fs/afs/afs.h |8 +
fs/afs/afs_fs.h|3
fs/afs/callback.c |3
fs/afs/dir.c |1
fs/afs/file.c |2
fs/afs/flock.c | 558
Implement file locking for AFS.
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/afs/Makefile|1
fs/afs/afs.h |8 +
fs/afs/afs_fs.h|3
fs/afs/callback.c |3
fs/afs/dir.c |1
fs/afs/file.c |2
fs/afs/flock.c | 558
34 matches
Mail list logo