| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 25/25] xfs: add write verifiers to log recovery |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Fri, 26 Oct 2012 04:54:48 -0400 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1351146854-19343-26-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1351146854-19343-1-git-send-email-david@xxxxxxxxxxxxx> <1351146854-19343-26-git-send-email-david@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
> + * during log recovery, we don't have a quotainfo structure to
> + * pull the number of dquots per buffer out of, so we have to calculate
> + * it directly.
> + */
> + if (mp->m_log->l_flags & XLOG_ACTIVE_RECOVERY) {
> + dquots_per_buf = BBTOB(bp->b_length);
> + do_div(dquots_per_buf, sizeof(xfs_dqblk_t));
No need for do_div when dividing a 32-bit value by a constant.
I'd be almost tempted to do the calculation unconditionally to make the
code cleaner, too.
> + * There is no easy way to do this except for trying a bunch of magic
> + * number matches....
How do we make sure buffers used for the symlink or attr payload don't
match this?
|
| Previous by Date: | Re: [PATCH 21/25] xfs: add buffer pre-write callback, Christoph Hellwig |
|---|---|
| Next by Date: | Re: Problems with kernel 3.6.x (vm ?) (was : Is kernel 3.6.1 or filestreams option toxic ?), Yann Dupont |
| Previous by Thread: | [PATCH 25/25] xfs: add write verifiers to log recovery, Dave Chinner |
| Next by Thread: | Re: [PATCH 25/25] xfs: add write verifiers to log recovery, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |