dazuko-devel
[Top][All Lists]
Advanced

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

RE: [Dazuko-devel] DazukoFS for FreeBSD 4


From: Patrick Bihan-Faou
Subject: RE: [Dazuko-devel] DazukoFS for FreeBSD 4
Date: Wed, 8 Sep 2004 21:48:16 +0200

Hi John,

Here is the patch set against a fresh checkout of the REL_21 branch of
dazuko.

This set of patch adds the following features:

- DAZUKO_ON_WRITE events: they monitor the following syscalls on freebsd 4:
        - write
        - writev
        - pwrite
        - aio_write (optionally)
        - ftruncate
        - mmap (to indicate that the file may be written)

  in each case the offset + the size of the write is indicated except for
the following cases:
   - truncate: only the offset is sent, no size
   - mmap: no size and no offset

  The write events are sent back to the userland daemon.

-  Support for the dup and dup2 syscalls.

  These are needed to properly track the number of references to a single
opened file. This also means that the hash structure used to keep track of
the monitored files contains a refcount.

- Finally, I have extended the logic of the filename resolution code to be
more consistent with what the system does as far as FOLLOW/NOFOLLOW goes and
also with respect to the CREATE logic.

- I have added the necessary options in configure to enable the write events
support and optionally the async I/O write (the issue with async is that
since the actual write may fail after the syscall occurs, the event may be
bogus, plus it makes it difficult to calculate the proper offset in case of
an append...).


All these changes have been tested on FreeBSD 4.9 and seem to be working
properly.


Next, I'll be working on the rename() syscall and various meta data stuff
(chmod, etc.)


In order to implement the writes/dups, I had to add a dazuko_hash_lookup()
call that returns a hash entry without removing it from the linked list.
Also in order to optimize a couple of things, I use this call from the
dazuko_freebsd.c file. This is not very clean architecture-wise, but it
simplifies a lot some cases. I think that this may call for the separation
of the hash linked list from the dazuko_xp.c code, or at least to make it
visible in a clean way from the platform specific code.


Anyway, there is room for improvement....


Have fun,


Patrick.


> -----Original Message-----
> From: John Ogness [mailto:address@hidden
> Sent: Wednesday, September 08, 2004 10:51 AM
> To: address@hidden
> Subject: Re: [Dazuko-devel] DazukoFS for FreeBSD 4
>
>
> Patrick Bihan-Faou wrote:
> > As I said, let me clean them up first ;)
> >
> > I'll send that today.
>
> Hi,
>
> No need to rush. My favorite part of open source development is that
> everyone can go at his own pace and do things when they have time
> for it. I
> probably won't be able to check out the patches until the weekend anyway.
>
> John Ogness
>
> --
> Dazuko Maintainer

Attachment: dz-2.1.0-pre1.write.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]