https://github.com/torvalds/linux
Revision 415cb800375cc4e89fb5a6a454e484bd4adbffb4 authored by Mark Fasheh on 17 September 2007, 03:10:16 UTC, committed by Mark Fasheh on 20 September 2007, 22:06:09 UTC
The ocfs2 write code loops through a page much like the block code, except
that ocfs2 allocation units can be any size, including larger than page
size. Typically it's equal to or larger than page size - most kernels run 4k
pages, the minimum ocfs2 allocation (cluster) size.

Some changes introduced during 2.6.23 changed the way writes to pages are
handled, and inadvertantly broke support for > 4k page size. Instead of just
writing one cluster at a time, we now handle the whole page in one pass.

This means that multiple (small) seperate allocations might happen in the
same pass. The allocation code howver typically optimizes by getting the
maximum which was reserved. This triggered a BUG_ON in the extend code where
it'd ask for a single bit (for one part of a > 4k page) and get back more
than it asked for.

Fix this by providing a variant of the high level allocation function which
allows the caller to specify a maximum. The traditional function remains and
just calls the new one with a maximum determined from the initial
reservation.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
1 parent 6d0b842
History
Tip revision: 415cb800375cc4e89fb5a6a454e484bd4adbffb4 authored by Mark Fasheh on 17 September 2007, 03:10:16 UTC
ocfs2: Allow smaller allocations during large writes
Tip revision: 415cb80
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 607 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 89.3 KB
Kbuild -rw-r--r-- 1.5 KB
MAINTAINERS -rw-r--r-- 91.2 KB
Makefile -rw-r--r-- 50.1 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top