From: Josef Bacik <jbacik@fusionio.com>
To: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>
Cc: Josef Bacik <JBacik@fusionio.com>,
Chris Mason <clmason@fusionio.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: No space left on device (28)
Date: Fri, 22 Mar 2013 11:54:53 -0400 [thread overview]
Message-ID: <20130322155453.GD1955@localhost.localdomain> (raw)
In-Reply-To: <514C6319.7030400@profihost.ag>
On Fri, Mar 22, 2013 at 07:56:41AM -0600, Stefan Priebe - Profihost AG wrote:
> Hi Josef,
> Am 22.03.2013 14:53, schrieb Josef Bacik:
> > On Fri, Mar 22, 2013 at 06:11:56AM -0600, Stefan Priebe - Profihost AG wrote:
> >> Hi Chris,
> >>
> >>>>>>> Which kernel are you running?
> >>>>>>>
> >>>>>>> -chris
> >>>>>>
> >>>>>> vanilla 3.8.3.
> >>>>>
> >>>>> Ok, with the 3.9 merge window Josef changed how we do the reservations.
> >>>>> Are you able to try a slightly more experimental kernel?
> >>
> >> any ideas what i can check? 3.9-rc3 gives me same results.
> >>
> >
> > Sorry Stefan I'm almost done with what I'm working on and then I'll work up a
> > patch for you to run so I can narrow down what's going on. Thanks,
>
> Great!
>
> Thanks - just wanted to know that it's not my fault. I'm happy to test
> the patch and provide feedback.
>
Ok I think we are way over-reserving for rename, can you give this patch a whirl
and see what happens? If it still fails can you capture dmesg and reply with
that so I can see what's going on. Thanks,
Josef
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 9ac2eca..aabaea6 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4161,6 +4161,11 @@ out:
ret = 0;
}
if (flushing) {
+ if (ret == -ENOSPC) {
+ printk(KERN_ERR "returning enospc, dumping space info\n");
+ dump_space_info(space_info, 0, 0);
+ }
+
spin_lock(&space_info->lock);
space_info->flush = 0;
wake_up_all(&space_info->wait);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index ca1b767..3980ae7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3679,11 +3679,9 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir,
* 1 for the dir item
* 1 for the dir index
* 1 for the inode ref
- * 1 for the inode ref in the tree log
- * 2 for the dir entries in the log
* 1 for the inode
*/
- trans = btrfs_start_transaction(root, 8);
+ trans = btrfs_start_transaction(root, 5);
if (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC)
return trans;
@@ -8127,7 +8125,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
* inodes. So 5 * 2 is 10, plus 1 for the new link, so 11 total items
* should cover the worst case number of items we'll modify.
*/
- trans = btrfs_start_transaction(root, 20);
+ trans = btrfs_start_transaction(root, 11);
if (IS_ERR(trans)) {
ret = PTR_ERR(trans);
goto out_notrans;
--
1.7.7.6
next prev parent reply other threads:[~2013-03-22 15:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 8:03 No space left on device (28) Stefan Priebe - Profihost AG
2013-03-21 18:00 ` Chris Mason
2013-03-21 18:35 ` Stefan Priebe - Profihost AG
2013-03-21 19:02 ` Chris Mason
2013-03-21 19:42 ` Stefan Priebe
2013-03-22 6:08 ` Stefan Priebe - Profihost AG
2013-03-22 12:11 ` Stefan Priebe - Profihost AG
2013-03-22 13:53 ` Josef Bacik
2013-03-22 13:56 ` Stefan Priebe - Profihost AG
2013-03-22 15:54 ` Josef Bacik [this message]
2013-03-22 19:10 ` Stefan Priebe
2013-03-22 20:49 ` Josef Bacik
2013-03-22 20:55 ` Stefan Priebe
2013-03-25 20:14 ` Josef Bacik
2013-03-26 7:45 ` Stefan Priebe
2013-03-26 12:53 ` Josef Bacik
2013-03-26 12:55 ` Stefan Priebe - Profihost AG
2013-03-26 13:30 ` Josef Bacik
2013-03-26 13:49 ` Stefan Priebe - Profihost AG
2013-03-26 14:44 ` Josef Bacik
2013-03-26 15:03 ` Stefan Priebe - Profihost AG
2013-03-26 15:25 ` Josef Bacik
2013-03-26 16:19 ` Stefan Priebe
2013-03-26 17:45 ` Josef Bacik
2013-03-26 19:05 ` Stefan Priebe
2013-03-26 19:16 ` Josef Bacik
2013-03-26 19:22 ` Stefan Priebe
2013-03-26 19:38 ` Josef Bacik
2013-03-26 19:47 ` Stefan Priebe
2013-03-22 6:13 ` Roman Mamedov
2013-03-22 6:24 ` cwillu
2013-03-22 6:39 ` Stefan Priebe - Profihost AG
2013-03-22 6:41 ` cwillu
2013-03-22 7:06 ` Stefan Priebe - Profihost AG
2013-03-22 6:38 ` Stefan Priebe - Profihost AG
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=20130322155453.GD1955@localhost.localdomain \
--to=jbacik@fusionio.com \
--cc=clmason@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=s.priebe@profihost.ag \
/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