xfs
[Top] [All Lists]

Re: XFS internal error xfs_trans_cancel at line 1150 of file fs/xfs/xfs_

To: "David Chinner" <dgc@xxxxxxx>
Subject: Re: XFS internal error xfs_trans_cancel at line 1150 of file fs/xfs/xfs_trans.c
From: "Christian Røsnes" <christian.rosnes@xxxxxxxxx>
Date: Mon, 10 Mar 2008 11:02:28 +0100
Cc: 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:content-transfer-encoding:content-disposition:references; bh=zdIiennxwldllE8wNGzQ0cfSsl+iYleF1zHG/0ysJP8=; b=QgoPXqNQqJVjGGLajieDXr2Bl0aty2Dhfi3cV7CSEekDahc85HblP3yMZ+D7uaJx3Sf8dLLJ+rhIja56KhypGIsa752joVBl3gCDU0YduYixRQCjNqVLRkraYW9WNTk6SIUvAlbSlEICxXgGJPMUQM58T0dkHJG279j1LoK09L0=
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:content-transfer-encoding:content-disposition:references; b=nWvL1f9dJlNXccQtyDk5rwPVJegHrHzYNRe/jRe6RO6plm+ZgGPQCCgihpJaz3Hgd3Yt363zuu8RXq4eoebVhBqfnBOYIsBz4iGNfPcgwOnXY8Gu0K1iRwGQ+rvsG6PPYo9mBvmpXBWDt68pDUWVRzjuloBilj398cG3Hcnzkbo=
In-reply-to: <1a4a774c0803100134k258e1bcfma95e7969bc44b2af@xxxxxxxxxxxxxx>
References: <1a4a774c0802130251h657a52f7lb97942e7afdf6e3f@xxxxxxxxxxxxxx> <20080213214551.GR155407@xxxxxxx> <1a4a774c0803050553h7f6294cfq41c38f34ea92ceae@xxxxxxxxxxxxxx> <1a4a774c0803060310w2642224w690ac8fa13f96ec@xxxxxxxxxxxxxx> <1a4a774c0803070319j1eb8790ek3daae4a16b3e6256@xxxxxxxxxxxxxx> <20080310000809.GU155407@xxxxxxx> <1a4a774c0803100134k258e1bcfma95e7969bc44b2af@xxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
On Mon, Mar 10, 2008 at 9:34 AM, Christian Røsnes
<christian.rosnes@xxxxxxxxx> wrote:
>  On Mon, Mar 10, 2008 at 1:08 AM, David Chinner <dgc@xxxxxxx> wrote:
>  > On Fri, Mar 07, 2008 at 12:19:28PM +0100, Christian Røsnes wrote:
>  >
>  >  > Instrumenting the code, I found that this occurs on my system when I
>  >  > do a 'mkdir /data/test' on the partition in question:
>  >  >
>  >  > in xfs_mkdir  (xfs_vnodeops.c):
>  >  >
>  >  >   error = xfs_dir_ialloc(&tp, dp, mode, 2,
>  >  >                         0, credp, prid, resblks > 0,
>  >  >                 &cdp, NULL);
>  >  >
>  >  >         if (error) {
>  >  >                 if (error == ENOSPC)
>  >  >                         goto error_return;   <=== this is hit and then
>  >  > execution jumps to error_return
>  >  >                 goto abort_return;
>  >  >         }
>  >
>  >  Ah - you can ignore my last email, then. You're already one step ahead
>  >  of me ;)
>  >
>  >  This does not appear to be the case I was expecting, though I can
>  >  see how we can get an ENOSPC here with plenty of blocks free - none
>  >  are large enough to allocate an inode chunk. What would be worth
>  >  knowing is the value of resblks when this error is reported.
>
>  Ok. I'll see if I can print it out.

Ok. I added printk statments to xfs_mkdir in xfs_vnodeops.c:

 'resblks=45' is the value returned by:

resblks = XFS_MKDIR_SPACE_RES(mp, dir_namelen);

and this is the value when the error_return label is called.

--

and inside xfs_dir_ialloc (file: xfs_utils.c) this is where it returns

       ...

       code = xfs_ialloc(tp, dp, mode, nlink, rdev, credp, prid, okalloc,
                          &ialloc_context, &call_again, &ip);

        /*
         * Return an error if we were unable to allocate a new inode.
         * This should only happen if we run out of space on disk or
         * encounter a disk error.
         */
        if (code) {
                *ipp = NULL;
                return code;
        }
        if (!call_again && (ip == NULL)) {
                *ipp = NULL;
                return XFS_ERROR(ENOSPC);   <============== returns here
        }



Christian


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