On Tue, 2002-06-11 at 13:03, Joshua Baker-LePain wrote:
> In the course of trying to track down some disk performance issues, I'm
> trying to mount an XFS partition on a (slow) SCSI disk synchronously via
> the fstab entry:
>
> /dev/sda1 /mnt/test xfs logbufs=8,sync 0 0
>
> However, I'm not getting the behavior I would expect:
>
> [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 0m57.848s
> user 0m0.000s
> sys 0m3.280s
>
> real 1m6.472s
> user 0m0.000s
> sys 0m0.610s
>
> So the 'dd' returns after 1 minute, but it takes it another minute to
> actually unmount the partition (during which there is lots of writing
> going on). I tried adding 'osyncisdysnc', which ISTR is the default now,
> and it (obviously) didn't help.
>
> Am I misinterpreting what's going on here? Is this the expected behavoir?
> The kernel is 2.4.18 from the 1.1 release.
>
> Thanks.
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.
Steve
--
Steve Lord voice: +1-651-683-3511
Principal Engineer, Filesystem Software email: lord@xxxxxxx
|