lkml.org 
[lkml]   [2007]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] AFS: Implement file locking
    Date
    J. Bruce Fields <bfields@fieldses.org> 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. It used to be inside the lock_kernel() section, but has since
    escaped.

    > Do you allow upgrades and downgrades? (Just curious.)

    AFS does not, as far as I know. Upgrades are dangerous anyway as you can get
    deadlock quite easily.

    > > + /* if we've already got a readlock on the server and no waiting
    > > + * writelocks, then we might be able to instantly grant another
    >
    > Is that comment correct? (You don't really test for "waiting
    > writelocks", do you?)

    Locally, yes. 'if (list_empty(&vnode->pending_locks))' covers it quite
    handily. I can't do anything about checking the server.

    David
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-05-27 02:01    [W:0.061 / U:59.476 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site