xfs
[Top] [All Lists]

Re: TAKE 964002 - Don't wait for pending I/Os when purging blocks beyond

To: "Lachlan McIlroy" <lachlan@xxxxxxx>
Subject: Re: TAKE 964002 - Don't wait for pending I/Os when purging blocks beyond eof.
From: "Bhagi rathi" <jahnu77@xxxxxxxxx>
Date: Tue, 11 Dec 2007 22:22:14 +0530
Cc: sgi.bugs.xfs@xxxxxxxxxxxx, xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=BarU9r+mLohefHrHql1ZEq+PtqPr8gaEahVjFXw+qCM=; b=nI8PlZKMr7I2kSaQAVcdSrEZ8SStn7pOqEcVcVGHkuBJ2ssuA5xQKt7q4oTawnouwnKieoIfatdr/fWEPJQEtEiYUd1X1je54M/uxHfGOJlVJXCBVeiOU4NY1/cDmjUeTx2LhZysMcmDt16ILBXhGE8Hl1t2CqudA4KoQLpXxUM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=j6EkM4nN+evwpYTUD+N6Yfwwm11z4wYXNIeMUPjTjlf6P/B2P9VxaChlxFJR+k0h8dFmw+1cxIQetqWD4XY4hwganvnhzdeYogYEg3z5ezP+q+pZYzQ4jXJSS/Z8nZnuYv4EcuHedtGQKSYlLvyRSymoMFpRBudomVJQKe+iOH0=
In-reply-to: <20071210055955.0F96358C4C34@chook.melbourne.sgi.com>
References: <20071210055955.0F96358C4C34@chook.melbourne.sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
On Dec 10, 2007 11:29 AM, Lachlan McIlroy <lachlan@xxxxxxx> wrote:

> Don't wait for pending I/Os when purging blocks beyond eof.
>
> On last close of a file we purge blocks beyond eof.  The same
> code is used when we truncate the file size down.  In this case
> we need to wait for any pending I/Os for dirty pages beyond the
> new eof.  For the last close case we are not changing the file
> size and therefore do not need to wait for any I/Os to complete.
> This fixes a performance bottleneck where writes into the page
> cache and cache flushes can become mutually exclusive.


Lachlan,

How the following is addressed if we don't wait for I/O to complete during
close of the file and
issue truncate:

        - We didn't waited for the I/O to complete
        - Truncated blocks beyond EOF.
        - These blocks are re-used for another transaction as meta-data.
        - Meta-data flush was induced. However the flush of meta-data
reached first before the data I/O
          because of some issues with under-lying driver. Later the file I/O
over-written the meta-data I/O.
          We have corruption of data.

It seems the corruption could be in various ways. Isn't this the reason why
truncate has to wait
for the I/O to complete? I believe fundamental problem is once the blocks
are free'ed, the re-association should
not expect some I/O in concurrent to those same block addresses.

-Cheers,
 Bhagi.


>
>
> Date:  Mon Dec 10 16:59:09 AEDT 2007
> Workarea:  redback.melbourne.sgi.com:/home/lachlan/isms/2.6.x-vniowait
> Inspected by:  pleckie
> Author:  lachlan
>
> The following file(s) were checked into:
>  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
>
>
> Modid:  xfs-linux-melb:xfs-kern:30220a
> fs/xfs/xfs_inode.c - 1.489 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/> 
xfs_inode.c.diff?r1=text&tr1=1.489&r2=text&tr2=1.488&f=h
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.489&r2=text&tr2=1.488&f=h
>        - Don't wait for pending I/Os when purging blocks beyond eof.
>
>
>
>
>


[[HTML alternate version deleted]]


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