From: Zach Brown <zab@zabbo.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: flush delayed inodes if we're short on space
Date: Thu, 21 Jun 2012 12:33:07 -0700 [thread overview]
Message-ID: <4FE376F3.5030609@zabbo.net> (raw)
In-Reply-To: <1340304875-8111-1-git-send-email-jbacik@fusionio.com>
> + case FLUSH_DELAYED_ITEMS_NR:
> + case FLUSH_DELAYED_ITEMS:
> + nr = (*state == FLUSH_DELAYED_ITEMS_NR) ? 10 : -1;
This 10 seemed awfully magical so I read a bit more.
It appears to be an attempt to pop back up into reserve_metadata_bytes()
to see if the caller has been satisfied before continuing on to apply
all the delayed items.
The magic number seems awfully clumsy. It'll either do too much work or
will blow through all the delayed items, depending on the load. Is it
too hard to have btrfs_run_delayed_items() check for the callers
reservation and return if there's a chance that it'll be satisfied?
Am I missing something? Over-thinking a rare path as the initial steps
will tend to free up space most of the time?
- z
next prev parent reply other threads:[~2012-06-21 19:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 18:54 [PATCH] Btrfs: flush delayed inodes if we're short on space Josef Bacik
2012-06-21 19:33 ` Zach Brown [this message]
2012-06-21 20:08 ` Josef Bacik
2012-06-21 21:10 ` Zach Brown
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=4FE376F3.5030609@zabbo.net \
--to=zab@zabbo.net \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.