[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DMAPI Attribute Event and Append



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@sgi.com>
To: "Francis Qu" <francis@raidzone.com>
Cc: "Linux XFS" <linux-xfs@oss.sgi.com>
Sent: Friday, March 22, 2002 1:55 PM
Subject: Re: DMAPI Attribute Event and Append


>
> >From:  "Francis Qu" <francis@raidzone.com>
> >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