linux_dsm_epyc7002/drivers/block/aoe
Ed Cashin fb32975d1b aoe: adjust ref of head for compound page tails
Fix a BUG which can trigger when direct-IO is used with AOE.

As discussed previously, the fact that some users of the block layer
provide bios that point to pages with a zero _count means that it is not
OK for the network layer to do a put_page on the skb frags during an
skb_linearize, so the aoe driver gets a reference to pages in bios and
puts the reference before ending the bio.  And because it cannot use
get_page on a page with a zero _count, it manipulates the value
directly.

It is not OK to increment the _count of a compound page tail, though,
since the VM layer will VM_BUG_ON a non-zero _count.  Block users that
do direct I/O can result in the aoe driver seeing compound page tails in
bios.  In that case, the same logic works as long as the head of the
compound page is used instead of the tails.  This patch handles compound
pages and does not BUG.

It relies on the block layer user leaving the relationship between the
page tail and its head alone for the duration between the submission of
the bio and its completion, whether successful or not.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-13 17:57:48 -07:00
..
aoe.h aoe: update internal version number to v83 2013-07-03 16:08:05 -07:00
aoeblk.c block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
aoechr.c aoe: replace kmalloc and then memcpy with kmemdup 2013-04-30 17:04:08 -07:00
aoecmd.c aoe: adjust ref of head for compound page tails 2013-08-13 17:57:48 -07:00
aoedev.c aoe: update copyright date 2013-07-03 16:08:05 -07:00
aoemain.c aoe: whitespace cleanup 2012-12-17 17:15:24 -08:00
aoenet.c aoe: update copyright date 2013-07-03 16:08:05 -07:00
Makefile drivers/block/aoe/Makefile: replace the use of <module>-objs with <module>-y 2011-01-19 08:25:02 -07:00