xfs
[Top] [All Lists]

Re: DMAPI Attribute Event and Append

To: "Dean Roehrich" <roehrich@xxxxxxx>
Subject: Re: DMAPI Attribute Event and Append
From: "Francis Qu" <francis@xxxxxxxxxxxx>
Date: Mon, 1 Apr 2002 10:02:06 -0500
Cc: "Linux XFS" <linux-xfs@xxxxxxxxxxx>
References: <200203221855.MAA14972@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
I tried to modify the source as you suggested and rebuilt the kernel. But it
didn't work. It appeared just as before. An append to the end of a file
doesn't trigger an attribute event. I used two test case:

1. open a file with append (O_APPEND) and write(2).

2. $ cat >> filename

Francis

----- Original Message -----
From: "Dean Roehrich" <roehrich@xxxxxxx>
To: "Francis Qu" <francis@xxxxxxxxxxxx>
Cc: "Linux XFS" <linux-xfs@xxxxxxxxxxx>
Sent: Friday, March 22, 2002 1:55 PM
Subject: Re: DMAPI Attribute Event and Append


>
> >From:  "Francis Qu" <francis@xxxxxxxxxxxx>
> >Hi Dean,
> >
> >When appending data to the end of a file, the file modification time and
> >change time are updated. But this operation cannot be caught as an
attribute
> >event. Do you have any idea about it?
>
> My guess is that we're getting out early in xfs_setattr(), before the
> DM_EVENT_ATTRIBUTE is generated.
>
> At the end of xfs_setattr() you'll find a dm_send_namesp_event() and its
> corresponding if-wrapper.  Put a copy of that if-block earlier in
> xfs_setattr(), inside the "if (mask & AT_UPDTIMES)" conditional.
>
> Let me know if that has anything to do with what you're seeing.
>
> Dean


<Prev in Thread] Current Thread [Next in Thread>
  • Re: DMAPI Attribute Event and Append, Francis Qu <=