[openbeos] Re: sync daemon?

On 1/18/07, Bruno Albuquerque <bga@xxxxxxxxxxxxx> wrote:
That does not make sense at all. I can format a flash media, for
instance, with any FS I want. So you are suggesting every possible FS
must be aware of flash devices? If so, then it is yet another point for
it being the the VFS layer and not the FS itself.

Please :)

You may format the flash device with any file system you fancy,
including flash-tailored ones if you have any care for the wear
effect. What I meant is that if you put the (whole) syncing work on
the upper, VFS layer, it just couldn't possibly take into account the
fact that sometimes the file system knows better. Syncing might not be
just a matter of flushing blocks into their raw sectors.

In any case, what the thread would do is simply call the sync() function
with will be implemented by each FS as they need it to.

But then either the FS would lie or it would make absolutely no
difference WRT timing. Syncing every 30s may not be appropriate for
flash/network/whatever file systems. Would you rather add
parameters/callbacks for every possible tunable aspect of the VFS
layer, or just let the file system take care of it, just in case the
defaults are not adequate?

Again, this is not FS dependent. This is media dependent. Again, In OSs
like Haiku I can format any media with any FS I want (as long as there
is enough space on that media to hold the FS structures.

Cool; how is the media going to tell the VFS layer it's not supposed
to handle some usage patterns? Enter the Grand Device ID Database Of
Every Possible Storage Device And Its Accompanying Technology!
</irony> ;)

Andre, again this makes no sense. The sync thread (or whatever it would
be) would just call sync() for each read-write filesystem.

Timing issues, BGA. Timing issues. It's not appropriate for some
devices to take a syncing command every fixed number of "time unit".
Some file systems were designed with this in mind, and like I said,
you could do the very same on the VFS layer as well, if you don't mind
bloating the interface with tunable parameters, callbacks and whatnot.

So, in your opinion, if we have a feature that is used by all
filesystems on earth we should implement it again and again in each
filesystem instead of the VFS layer? Well, you are wrong.

No, that's what defaults are for. They allow you not to care if you
don't want to care, and to override something to suit one's need when
that's the case.

Other related posts: