Re: [PATCH 33/49] ext4: Add the journal checksum feature

Andreas Dilger
2008-01-23T22:40:54Z

On Jan 23, 2008 14:07 -0800, Andrew Morton wrote:
> > +{
> > + struct page *page = bh->b_page;
> > + char *addr;
> > + __u32 checksum;
> > +
> > + addr = kmap_atomic(page, KM_USER0);
> > + checksum = crc32_be(crc32_sum,
> > + (void *)(addr + offset_in_page(bh->b_data)), bh->b_size);
> > + kunmap_atomic(addr, KM_USER0);
> > +
> > + return checksum;
> > +}
>
> Can this buffer actually be in highmem?

Yes, this was found during system testing. While ext3/4 will only allocate
buffer heads in lowmem, the jbd/jbd2 code can allocate buffers in highmem.
I was surprised about this also.

Please see the thread in ext4-devel:
[PATCH][RFC]JBD2: Fix journal checksum kernel oops on NUMA

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.