]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: don't require r_num_pages for bio requests
authorAlex Elder <elder@inktank.com>
Thu, 31 Jan 2013 22:02:00 +0000 (16:02 -0600)
committerSage Weil <sage@inktank.com>
Thu, 14 Feb 2013 02:29:11 +0000 (18:29 -0800)
commit5546c86a22843a2fa7a97ed10b0b993818cbd720
tree573dfaa8590be939671c73d3536fe031094d1b2e
parent7d39ef18d6f791e0fee4ae80238e4b10e12e351c
libceph: don't require r_num_pages for bio requests

There is a check in the completion path for osd requests that
ensures the number of pages allocated is enough to hold the amount
of incoming data expected.

For bio requests coming from rbd the "number of pages" is not really
meaningful (although total length would be).  So stop requiring that
nr_pages be supplied for bio requests.  This is done by checking
whether the pages pointer is null before checking the value of
nr_pages.

Note that this value is passed on to the messenger, but there it's
only used for debugging--it's never used for validation.

While here, change another spot that used r_pages in a debug message
inappropriately, and also invalidate the r_con_filling_msg pointer
after dropping a reference to it.

This resolves:
    http://tracker.ceph.com/issues/3875

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c
net/ceph/osd_client.c