RE: VFS write operations (Michael Welch)
RE: VFS write operations (Michael Welch)
- Subject: RE: VFS write operations (Michael Welch)
- From: "Michael Welch" <email@hidden>
- Date: Thu, 14 Sep 2006 12:45:47 -0700
- Thread-topic: VFS write operations (Michael Welch)
Doh! I hadn't implemented VNOP_FSYNC. A simple "return 0;"
implementation was enough to cure TextEdit's problems.
Thanks!
- Mike
> -----Original Message-----
> From: Sam Vaughan [mailto:email@hidden]
> Sent: Tuesday, September 12, 2006 8:48 PM
> To: Michael Welch
> Cc: email@hidden
> Subject: Re: VFS write operations (Michael Welch)
>
> On 13/09/2006, at 12:42 PM, Michael Welch wrote:
>
> > Thanks, Sam. I will give ktrace a whirl and see if
> anything else pops
> > up. In the mean time, I should mention:
> >
> > 1) I have not implemented VNOP_EXCHANGE. In VFS_GETATTR I
> set it as a
> > valid but not supported capability. "I'm aware of
> ExchangeData, but I
> > don't do that..."
> >
> > 2) I have implemented VNOP_RENAME, and it seems to work
> fine from both
> > the command line ($mv file1 file2) and through the Finder.
> >
> > In my TextEdit scenario, I don't even see a rename
> attempted. I see
> > it create a new file, write the contents there (successfully), read
> > the file's attributes, and then delete it and bail. Maybe
> ktrace will
> > reveal some additional steps going on in there that I don't see
> > otherwise.
>
> That's interesting. In the ktrace I just ran on UFS there's
> very little happening between the first data write and the rename:
>
> 15177 TextEdit CALL open(0xbfffd560,0xa02,0x180)
> 15177 TextEdit NAMI "/Volumes/ufs/.dat3b49.000"
> 15177 TextEdit NAMI "._.dat3b49.000"
> 15177 TextEdit RET open 7
> 15177 TextEdit CALL write(0x7,0x311320,0x5)
> 15177 TextEdit GIO fd 7 wrote 5 bytes
> "food
> "
> 15177 TextEdit RET write 5
> 15177 TextEdit CALL fsync(0x7)
> 15177 TextEdit RET fsync 0
> 15177 TextEdit CALL close(0x7)
> 15177 TextEdit RET close 0
> 15177 TextEdit CALL rename(0xbfffd560,0xbfffdda0)
> 15177 TextEdit NAMI "/Volumes/ufs/.dat3b49.000"
> 15177 TextEdit NAMI "/Volumes/ufs/.15177-179803682-1.txt"
> 15177 TextEdit NAMI "._.dat3b49.000"
> 15177 TextEdit NAMI "._.15177-179803682-1.txt"
> 15177 TextEdit RET rename 0
>
> Have you implemented VNOP_FSYNC? Perhaps the fsync call is
> returning an error on your file system.
>
> Sam
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden