xfs
[Top] [All Lists]

Re: [PATCH v3 2/3] xfs: Print error when xfs_ialloc_ag_select fails to f

To: raghu.prabhu13@xxxxxxxxx
Subject: Re: [PATCH v3 2/3] xfs: Print error when xfs_ialloc_ag_select fails to find continuous free space.
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 29 Oct 2012 09:10:59 +1100
Cc: xfs@xxxxxxxxxxx, bpm@xxxxxxx, elder@xxxxxxxxxx, Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx>
In-reply-to: <9acdfb22ee7a1fbf777f866182d01009a3bea879.1348641483.git.rprabhu@xxxxxxxxxxx>
References: <cover.1348641483.git.rprabhu@xxxxxxxxxxx> <9acdfb22ee7a1fbf777f866182d01009a3bea879.1348641483.git.rprabhu@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Sep 26, 2012 at 12:26:48PM +0530, raghu.prabhu13@xxxxxxxxx wrote:
> From: Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx>
> 
> When xfs_ialloc_ag_select fails to find any AG with continuous free blocks
> required for inode allocation, printk the error in ratelimited manner.
> 
> Signed-off-by: Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx>
> ---
>  fs/xfs/xfs_ialloc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
> index 5aceb3f..e75a39d 100644
> --- a/fs/xfs/xfs_ialloc.c
> +++ b/fs/xfs/xfs_ialloc.c
> @@ -539,8 +539,11 @@ nextag:
>               if (agno >= agcount)
>                       agno = 0;
>               if (agno == pagno) {
> -                     if (flags == 0)
> +                     if (flags == 0) {
> +                             xfs_err_ratelimited(mp,
> +                                     "Out of continuous free blocks for 
> inode allocation");
>                               return NULLAGNUMBER;
> +                     }

>From here:

http://oss.sgi.com/archives/xfs/2012-09/msg00138.html

I quote:

| http://oss.sgi.com/archives/xfs/2012-06/msg00041.html
| 
| <quote>
| Couple of things for all 3 patches. Firstly - 80 columns. We tend
| to keep the pformat string on a single line so it is easy to grep
| for like so:
| 
|                               pr_err_once(mp,
|                 "Insufficient contiguous free space for inode allocation");
| </quote>
| 
| So, you need to change the error message to the one suggested, and
| follow 80-character width limits like the rest of the code.
| 
| Also, I think the error message is better at the caller site, not in
| the function itself. i.e. if we get a NULLAGNUMBER returned, the
| caller decided whether to emit an error message or not."

So, the message here needs to change to what is suggested above, and
the location of the message needs to change i.e. to the caller, not
within the function itself.

Review comments need to be addressed before you repost patches....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH v3 2/3] xfs: Print error when xfs_ialloc_ag_select fails to find continuous free space., Dave Chinner <=