VOP_RENAME of the future

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Mon Aug 7 16:18:12 PDT 2006


Matthew Dillon wrote:
:It seems then that I was wrong. I misunderstood the meaning of the lock
:flags. I thought LK_RETRY is the way for making the lock acquisition
:blocking, and without that the lock acquisition becomes non-blocking 
:and thence fallible.
:
:Sorry for arguing based on a confused perception of the concepts
:involved.

    This is a very common mistake, and it's really the fault of the lockmgr
    code, not you.  The original designers of the lockmgr code in their
    infinite wisdom made the locking code not retry a blocked lock by 
    default.  It's absolutely the wrong way to do it.  So if you do a 
    lockmgr LK_EXCLUSIVE without LK_RETRY, it will still block, but it 
    won't retry after it unblocks.
what?  which use could this have, ever?  what happens then when it unblocks, will it just sleep or will it fail after the lock becomes free again?

cheers
 simon
--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00000.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20060807/f2050c6b/attachment-0020.obj>


More information about the Kernel mailing list