xfs
[Top] [All Lists]

Re: [PATCH 2/7] xfs: Use delayed write for inodes rather than async

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/7] xfs: Use delayed write for inodes rather than async
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 25 Jan 2010 06:53:08 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1264400564-19704-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1264400564-19704-1-git-send-email-david@xxxxxxxxxxxxx> <1264400564-19704-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
> diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
> index 98b8937..ca0cc59 100644
> --- a/fs/xfs/linux-2.6/xfs_sync.c
> +++ b/fs/xfs/linux-2.6/xfs_sync.c
> @@ -270,8 +270,7 @@ xfs_sync_inode_attr(
>               goto out_unlock;
>       }
>  
> -     error = xfs_iflush(ip, (flags & SYNC_WAIT) ?
> -                        XFS_IFLUSH_SYNC : XFS_IFLUSH_DELWRI);
> +     error = xfs_iflush(ip, (flags & SYNC_WAIT));

No need for the masking here, as xfs_iflush simply ignores SYNC_TRYLOCK.

>       /* Now we have an inode that needs flushing */
>       error = xfs_iflush(ip, sync_mode);
> +     if (!(sync_mode & SYNC_WAIT))
> +             goto requeue_no_flock;

So for the !wait case we entirely ignore the return value?  We should
at least check for an I/O error here I think.  Also in this context
the requeue label name doesn't fit too well, even if it's the same
action as the requeue.

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