Commit a1e80c20 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] iscsi: use pageslab

From: FUJITA Tomonori <[email protected]> and [email protected]:

We cannot handle filesystems like XFS becuase of the pages they
are sending us. We had thought page_count could be used to
work around this, but the correct test is for PageSlab.

The proper solution is to figure out what type of pages
filesystems can use so we do not have to add tests like
this or handle it in the block layer for all network block drivers
but the issue still has not been resolved on fs-devel
so we are sending this patch as a temporary fix.

This is last patch just in case it is Nakd with the explanation
that we need to push the correct fix through fs-devel, mm
or the block layer. The rest of the patchset can live without
the patch, but the driver will not work with filesystems like
XFS.
Signed-off-by: default avatarAlex Aizman <[email protected]>
Signed-off-by: default avatarDmitry Yusupov <[email protected]>
Signed-off-by: default avatarMike Christie <[email protected]>
Signed-off-by: default avatarJames Bottomley <[email protected]>
parent 55e3299d
......@@ -109,7 +109,7 @@ iscsi_buf_init_sg(struct iscsi_buf *ibuf, struct scatterlist *sg)
/*
* Fastpath: sg element fits into single page
*/
if (sg->length + sg->offset <= PAGE_SIZE && page_count(sg->page) >= 2)
if (sg->length + sg->offset <= PAGE_SIZE && !PageSlab(sg->page))
ibuf->use_sendmsg = 0;
else
ibuf->use_sendmsg = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment