]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix min bufsize bugs in two places
authorAlex Elder <aelder@sgi.com>
Tue, 13 Apr 2010 05:22:29 +0000 (15:22 +1000)
committerAlex Elder <aelder@sgi.com>
Wed, 19 May 2010 14:58:12 +0000 (09:58 -0500)
commit7c2ac6391767bfe5c7de336ac96b68c3b5708a14
tree8faf52f576ab7bfc49712cfd98c49d23a596a98b
parent5953985048ca1e3756fd7c600fd02f98d8016313
xfs: fix min bufsize bugs in two places

This fixes a bug in two places that I found by inspection.  In
xlog_find_verify_cycle() and xlog_write_log_records(), the code
attempts to allocate a buffer to hold as many blocks as possible.
It gives up if the number of blocks to be allocated gets too small.
Right now it uses log->l_sectbb_log as that lower bound, but I'm
sure it's supposed to be the actual log sector size instead.  That
is, the lower bound should be (1 << log->l_sectbb_log).

Also define a simple macro xlog_sectbb(log) to represent the number
of basic blocks in a sector for the given log.

(No change from original submission; I have implemented Christoph's
suggestion about storing l_sectsize rather than l_sectbb_log in
a new, separate patch in this series.)

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_log_recover.c