[Top] [All Lists]

Re: [PATCH] xfs: synchronously write the superblock on unmount

To: tinguely@xxxxxxx
Subject: Re: [PATCH] xfs: synchronously write the superblock on unmount
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 26 Jun 2012 17:06:55 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120626160102.898671754@xxxxxxx>
References: <20120626160051.364635296@xxxxxxx> <20120626160102.898671754@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
>  /*
> - * xfs_log_sbcount
> + * xfs_write_sbcount

Please drop these function name comment line in anything you touch.

>   *
>   * Sync the superblock counters to disk.
>   *
> - * Note this code can be called during the process of freezing, so
> - * we may need to use the transaction allocator which does not
> - * block when the transaction subsystem is in its frozen state.
>   */

Can you add a little commt here on why we write it out synchronously?
Basically a shortened version of the commit message.

>       if (!xfs_sb_version_haslazysbcount(&mp->m_sb))
> -             return 0;
> +     return 0;

As mentioned by carlos the indendation here got messed up a bit.

> -extern int   xfs_log_sbcount(xfs_mount_t *);
> +extern int
> +xfs_write_sbcount(
> +     struct xfs_mount *mp);
>  extern __uint64_t xfs_default_resblks(xfs_mount_t *mp);

For the header I'd suggest to keep the simple indentation style.

Otherwise the changes look good to, thanks a lot!

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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