Bug 173153

Summary: kernel dm: 1024K snapshot chunksize causes bvec_alloc_bs() failure
Product: Red Hat Enterprise Linux 6 Reporter: Alasdair Kergon <agk>
Component: kernelAssignee: Mikuláš Patočka <mpatocka>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: agk, andriusb, coughlan, dwysocha, jbaron, mbroz, notting
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-18 16:40:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 430698    

Description Alasdair Kergon 2005-11-14 18:17:05 UTC
The snapshot chunk size must not exceed 512K or else bvec_alloc_bs()
will fail with 4K pages, and snapshot metadata needs to be usable
regardless of page size.

dm-snapshot-chunksize-fix.patch

Comment 11 Alasdair Kergon 2008-02-28 23:09:14 UTC
I can't think of a clean way to do this properly.  Let's just check we detect
incompatible snapshots and don't attempt to activate them.  Quick investigation
and see if anything simple needs changing.

Comment 12 Mikuláš Patočka 2008-03-07 21:21:38 UTC
I tested big snapshots (8M and 16M) on upstream, RHEL 4 and RHEL 5 and they just
work. (I remove the test from lvcreate)

If they didn't, it would be quite trivial to make them work (code for breaking
the request up into pieces is already in kcopyd, so it could be just used
properly).

Comment 19 RHEL Program Management 2009-02-05 23:32:07 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 21 Alasdair Kergon 2009-11-17 18:25:47 UTC
So in summary, I believe the original problem - the crash that occurred when creating a snapshot with a large chunksize on one architecture and later using it on an architecture with a different page size - has been fixed upstream (and therefore in RHEL6).  Mikulas, if you agree, we should now close this bug.

Comment 22 Mikuláš Patočka 2009-11-18 16:40:51 UTC
Yes, it is fixed in upstream 2.6.29 and above, so it will be fixed in RHEL 6.0 as well.

Some times ago I tested chunk sizes bigger than 1M and they work. So I'm closing this bug.

BTW. that crash with chunk_size < page_size is a separate issue, and it was already fixed in upstream and in RHEL 5.