xfs
[Top] [All Lists]

Re: How to know that file was closed in dmapi?

To: nova shin <novashine@xxxxxxxxx>
Subject: Re: How to know that file was closed in dmapi?
From: Dean Roehrich <roehrich@xxxxxxx>
Date: Fri, 29 Apr 2005 22:11:01 -0500
Cc: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
>From:  nova shin <novashine@xxxxxxxxx>
>> We currently don't support the CLOSE event for XFS.
>
>Does it  mean that there is no way to know when the 'create' was finished?

The definition of the CLOSE event is unclear:

http://www.opengroup.org/onlinepubs/9657099/chap3.htm#tagcjh_04_05_03

I don't see how it could have anything to do with the CREATE event or with the
creation of a file.

If the file is created with open(O_CREAT) then you might expect a CLOSE event
when close() is called--but the spec doesn't say it has to be implemented that
way.  If 5 applications open() the file at the same time, and then one-by-one
they close() the file, the CLOSE event could come on the last close() by the
last application.  Or, you could get a CLOSE event from each application as it
closes the file.

If one application opens the file 5 times and then does 5 closes you could get
one CLOSE event on the last close or you could get 5 CLOSE events.

The DMAPI spec really leaves this wide open.

In my mind, the create is "finished" after the inode has been allocated and
hooked up to the directory--so have you looked at the POSTCREATE event?

http://www.opengroup.org/onlinepubs/9657099/chap3.htm#tagcjh_04_03_02

Dean


>At all?
>I'm not sure.
>
>On 4/30/05, Dean Roehrich <roehrich@xxxxxxx> wrote:
>>=20
>> We currently don't support the CLOSE event for XFS.
>>=20
>> Dean
>>=20
>> >From:  nova shin <novashine@xxxxxxxxx>
>> >Does anybody here know how to detect that file was closed?
>> >
>> >I am a novice to DMAPI in Linux-XFS.
>> >I am trying to develop an application for HSM.
>> >
>> >Dmapi version is a dmapi-2.2.1-1.
>> >
>> >I read a docmunet for Dmapi.
>> >It said that dmapi have a file 'close' event.
>> >
>> >But I could not get any 'close' event from dmapi, especially when the
>> >'create' operation was finished.
>> >
>> >Is it a my mistake? Or it is not supported?
>> >
>> >How should i know?
>> >Please let me know how to do that.
>> >
>> >Thanks a lot in advance.
>> >Regards,
>> >Nova
>> >
>> >
>>
>


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