xfs
[Top] [All Lists]

Re: mounting with sync?

To: Steve Lord <lord@xxxxxxx>
Subject: Re: mounting with sync?
From: Joshua Baker-LePain <jlb17@xxxxxxxx>
Date: Tue, 11 Jun 2002 15:55:32 -0400 (EDT)
Cc: Linux xfs mailing list <linux-xfs@xxxxxxxxxxx>
In-reply-to: <1023819402.19330.32.camel@jen.americas.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
On 11 Jun 2002 at 1:16pm, Steve Lord wrote

> Try editing fs/xfs/linux/xfs_lrw.c
> 
> Look for this code (line 623 in my version):
> 
>         /* Handle various SYNC-type writes */
>         if (file->f_flags & O_SYNC) {
> 
> Change it to
> 
>       if ((file->f_flags & O_SYNC) || IS_SYNC(ip)) {
> 
> See if that does it.

In my version (2.4.18 from 1.1 Release) it's on line 752, and looks like 
this:

        /* Handle various SYNC-type writes */
        if (ioflags & O_SYNC) {

I changed it to:
        if ((ioflags & O_SYNC) || IS_SYNC(ip)) {

and got the expected behavior:

[root@brian root]# time dd if=/dev/zero of=/mnt/test/bigfile bs=1024k 
count=512; time umount /mnt/test
512+0 records in
512+0 records out

real    1m58.351s
user    0m0.010s
sys     0m3.940s

real    0m0.413s
user    0m0.000s
sys     0m0.310s

Thanks!

-- 
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University


<Prev in Thread] Current Thread [Next in Thread>