[Top] [All Lists]

Re: DMAPI rights

To: Dean Roehrich <roehrich@xxxxxxx>
Subject: Re: DMAPI rights
From: "James A Goodwin" <jagoodwi@xxxxxxxxxx>
Date: Thu, 14 Feb 2002 09:09:16 -0600
Cc: linux-xfs@xxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
Are you saying that rights do exist and are checked at the DMAPI level?  If
so, does this mean that a DMAPI program could use rights to synchronize
between DMAPI calls but must use some other mechanism to coordinate with
non-DMAPI clients of the filesystem?

Let me clarify a bit.  Let's say that I have two DMAPI programs that want
to modify the DM attributes of the same file using the dm_set_dmattr()
call.  If they both call dm_request_right() to get a DM_RIGHT_EXCL right to
the file, one will get the right while the other will block.  When the
initial program finally calls dm_release_right() the second program will
get the DM_RIGHT_EXCL and continue.  Is that correct?

By the way, I did read the comments on rights in the dmapi_event.c, and it
was more informative about what should be done in the future than what
currently exists in the code.  Thanks for the reference though.

-James Goodwin
Software Engineer
IBM Global Services - Federal
Phone: (281) 336 2578
Fax: (281) 335 4231
T/L 260-2578

                      Dean Roehrich                                             
                      <roehrich@xxxxxxx        To:       James A 
                      >                        cc:       linux-xfs@xxxxxxxxxxx  
                                               Subject:  Re: DMAPI rights       
                      02/13/2002 05:10                                          

>From:  "James A Goodwin" <jagoodwi@xxxxxxxxxx>
>Since XFS DMAPI doesn't implement rights, rights obviously can't be
>attached to tokens.  Does this mean that every call requiring a certain
>level of 'rights' must be called using DM_NO_TOKEN?

No, we do attach rights to tokens.  It's just that XFS itself knows nothing
about the rights and once you step out of the DMAPI code and into the XFS
your rights won't be honored.

A dm_request_right/dm_release_right will do a hold/rele on the vnode, at
least.  Other than that, the rights stuff is a no-op.

There's a write-up on rights in fs/xfs_dmapi/dmapi_event.c, though I don't
know how much of that reflects the current code.


<Prev in Thread] Current Thread [Next in Thread>