| To: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 008/119] xfs: separate freelist fixing into a separate helper |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Fri, 17 Jun 2016 04:52:04 -0700 |
| Cc: | david@xxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, vishal.l.verma@xxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <146612632363.12839.15504324533944246285.stgit@xxxxxxxxxxxxxxxx> |
| References: | <146612627129.12839.3827886950949809165.stgit@xxxxxxxxxxxxxxxx> <146612632363.12839.15504324533944246285.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.24 (2015-08-30) |
> +/* Ensure that the freelist is at full capacity. */
> +int
> +xfs_free_extent_fix_freelist(
> + struct xfs_trans *tp,
> + xfs_agnumber_t agno,
> + struct xfs_buf **agbp)
> {
> - xfs_alloc_arg_t args;
> - int error;
> + xfs_alloc_arg_t args;
Use struct xfs_alloc_arg if you change this anyway.
> + int error;
>
> - ASSERT(len != 0);
> memset(&args, 0, sizeof(xfs_alloc_arg_t));
Same here.
> - if (args.agbno + len >
> - be32_to_cpu(XFS_BUF_TO_AGF(args.agbp)->agf_length)) {
> - error = -EFSCORRUPTED;
> - goto error0;
> - }
> + XFS_WANT_CORRUPTED_GOTO(mp,
> + agbno + len <=
> be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_length),
> + err);
This introduces an overly long line.
But except for these nitpicks this looks fine:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
|
| Previous by Date: | Re: [PATCH 002/119] vfs: support FS_XFLAG_REFLINK and FS_XFLAG_COWEXTSIZE, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 009/119] xfs: convert list of extents to free into a regular list, Christoph Hellwig |
| Previous by Thread: | [PATCH 008/119] xfs: separate freelist fixing into a separate helper, Darrick J. Wong |
| Next by Thread: | Re: [PATCH 008/119] xfs: separate freelist fixing into a separate helper, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |