Bug #537

Journaling patches

Added by steve almost 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hi,

The first attached patch (jscan_patches) makes the -D option of
jscan work. It includes tests that the directory actually exists. Apply
within /usr/src/sbin/jscan

The second attached patch (vfs_journal.c.patch) removes the
leading / from paths in the journal that has crept in due to changes in
namecache behaviour (it makes the path generation ignore namecache entries
with 0 length names). Apply within /usr/src/sys/kern.

With these two patches applied I have been happily hammering a
journal mirror in a vkernel with no ill effects (but it has made me realise
that I really should think of a way to limit the number of old journal
files that are kept before I start to use this in anger).

Having the journal appears to reduce the filesystem performance to
about one third of it's unjournaled level however some of that is probably
due to the journal being on the same disc as the filesystem.

jscan.patches (1.46 KB) steve, 01/25/2007 11:20 AM

vfs_journal.c.patch Magnifier (753 Bytes) steve, 01/25/2007 11:20 AM

jscan.patch Magnifier (1.19 KB) steve, 01/26/2007 10:46 AM

History

#1 Updated by dillon over 7 years ago

: Hi,
:
: The first attached patch (jscan_patches) makes the -D option of
:jscan work. It includes tests that the directory actually exists. Apply
:within /usr/src/sbin/jscan

Ok, this one needs a little work. You are calling chdir() on every
single journaling record rather then just once at the beginning
(e.g. up in jscan.c before the loops that call dump_mirror()).

The bit in jscan.c should use !S_ISDIR(sb.st_mode) instead of
(sb.st_mode & S_IFDIR).

I am branching the tree now but if you submit a tested follow up
I will put it into both branches.

: The second attached patch (vfs_journal.c.patch) removes the
:leading / from paths in the journal that has crept in due to changes in
:namecache behaviour (it makes the path generation ignore namecache entries
:with 0 length names). Apply within /usr/src/sys/kern.

This looks ok. I will commit this bit right now.

: With these two patches applied I have been happily hammering a
:journal mirror in a vkernel with no ill effects (but it has made me realise
:that I really should think of a way to limit the number of old journal
:files that are kept before I start to use this in anger).
:
: Having the journal appears to reduce the filesystem performance to
:about one third of it's unjournaled level however some of that is probably
:due to the journal being on the same disc as the filesystem.

Write performance will suffer a lot with this sort of journaling,
though it is buffered fairly well within the kernel.

-Matt
Matthew Dillon
<>

#2 Updated by steve over 7 years ago

On Thu, 25 Jan 2007 10:18:04 -0800 (PST)
Matthew Dillon <> wrote:

The attached patch (to jscan.c only) addresses these points and
works nicely in my vkernel environment.

Indeed, I wasn't complaining just leaving some figures so that
perhaps others would not be surprised.

#3 Updated by dillon over 7 years ago

:
: The attached patch (to jscan.c only) addresses these points and
:works nicely in my vkernel environment.

Committed!

-Matt

Also available in: Atom PDF