32 #include <linux/module.h>
37 #include <linux/hash.h>
41 #define NFSDBG_FACILITY NFSDBG_PNFS_LD
47 *rp = xdr_decode_hyper(*rp, &s);
97 struct pnfs_device *
dev)
102 struct rpc_pipe_msg *
msg = &bl_pipe_msg.
msg;
105 .totallen = dev->mincount,
114 dprintk(
"%s CREATING PIPEFS MESSAGE\n", __func__);
115 dprintk(
"%s: deviceid: %s, mincount: %d\n", __func__, dev->dev_id.data,
119 memset(msg, 0,
sizeof(*msg));
120 msg->data = kzalloc(
sizeof(bl_msg) + dev->mincount,
GFP_NOFS);
126 memcpy(msg->data, &bl_msg,
sizeof(bl_msg));
127 dataptr = (
uint8_t *) msg->data;
129 offset =
sizeof(bl_msg);
130 for (i = 0; len > 0; i++) {
136 msg->len =
sizeof(bl_msg) + dev->mincount;
138 dprintk(
"%s CALLING USERSPACE DAEMON\n", __func__);
153 dprintk(
"%s failed to open device: %d\n",
162 dprintk(
"%s failed to open device : %ld\n", __func__,
168 rv = kzalloc(
sizeof(*rv),
GFP_NOFS);
177 dprintk(
"%s Created device %s with bd_block_size %u\n",
188 static struct block_device *translate_devid(
struct pnfs_layout_hdr *lo,
195 dprintk(
"%s enter, lo=%p, id=%p\n", __func__, lo,
id);
207 dprintk(
"%s returning %p\n", __func__, rv);
274 struct xdr_stream stream;
286 dprintk(
"---> %s\n", __func__);
301 dprintk(
"%s enter, number of extents %i\n", __func__, count);
310 for (i = 0; i <
count; i++) {
325 if (decode_sector_number(&p, &be->
be_f_offset) < 0)
327 if (decode_sector_number(&p, &be->
be_length) < 0)
329 if (decode_sector_number(&p, &be->
be_v_offset) < 0)
334 if (verify_extent(be, &lv)) {
335 dprintk(
"%s verify failed\n", __func__);
342 dprintk(
"%s Final length mismatch\n", __func__);
347 dprintk(
"%s Final uncovered COW extent\n", __func__);
372 dprintk(
"%s returns %i\n", __func__, status);
377 while (!list_empty(&extents)) {