public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian Røsnes" <christian.rosnes@gmail.com>
To: David Chinner <dgc@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: XFS internal error xfs_trans_cancel at line 1150 of file fs/xfs/xfs_trans.c
Date: Mon, 10 Mar 2008 11:02:28 +0100	[thread overview]
Message-ID: <1a4a774c0803100302y17530814wee7522aa0dfd7668@mail.gmail.com> (raw)
In-Reply-To: <1a4a774c0803100134k258e1bcfma95e7969bc44b2af@mail.gmail.com>

On Mon, Mar 10, 2008 at 9:34 AM, Christian Røsnes
<christian.rosnes@gmail.com> wrote:
>  On Mon, Mar 10, 2008 at 1:08 AM, David Chinner <dgc@sgi.com> 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

  reply	other threads:[~2008-03-10 10:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13 10:51 XFS internal error xfs_trans_cancel at line 1150 of file fs/xfs/xfs_trans.c Christian Røsnes
2008-02-13 11:04 ` Justin Piszcz
2008-02-13 11:44   ` Christian Røsnes
2008-02-13 21:45 ` David Chinner
2008-02-14  8:41   ` Christian Røsnes
2008-03-05 13:53   ` Christian Røsnes
2008-03-06 11:10     ` Christian Røsnes
2008-03-07 11:19       ` Christian Røsnes
2008-03-10  0:08         ` David Chinner
2008-03-10  8:34           ` Christian Røsnes
2008-03-10 10:02             ` Christian Røsnes [this message]
2008-03-10 22:21             ` David Chinner
2008-03-11  8:08               ` Christian Røsnes
2008-03-11  9:34                 ` David Chinner
2008-03-11 11:19                   ` Christian Røsnes
2008-03-11 12:21                     ` David Chinner
2008-03-11 12:39                       ` Christian Røsnes
     [not found]                         ` <20080312232425.GR155407@sgi.com>
     [not found]                           ` <1a4a774c0803130114l3927051byd54cd96cdb0efbe7@mail.gmail.com>
     [not found]                             ` <20080313090830.GD95344431@sgi.com>
     [not found]                               ` <1a4a774c0803130214x406a4eb9wfb8738d1f503663f@mail.gmail.com>
     [not found]                                 ` <20080313092139.GF95344431@sgi.com>
     [not found]                                   ` <1a4a774c0803130227l2fdf4861v21183b9bd3e7ce8d@mail.gmail.com>
     [not found]                                     ` <20080313113634.GH95344431@sgi.com>
     [not found]                                       ` <1a4a774c0803130446x609b9cb2mf3da323183c35606@mail.gmail.com>
2008-03-13 14:53                                         ` David Chinner
2008-03-14  9:02                                           ` Christian Røsnes
2008-03-09 22:59     ` David Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a4a774c0803100302y17530814wee7522aa0dfd7668@mail.gmail.com \
    --to=christian.rosnes@gmail.com \
    --cc=dgc@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox