* [PATCH 1/4] SQUASHME pnfs-submit remove unused pnfs_return_layout_done
@ 2010-07-15 16:33 andros
2010-07-15 16:33 ` [PATCH 2/4] SQUASHME pnfs-submit remove unused nfs4_filelayout fields andros
0 siblings, 1 reply; 4+ messages in thread
From: andros @ 2010-07-15 16:33 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Not used by any layout driver
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/pnfs.c | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 7327cb2..b9ada8e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -761,21 +761,6 @@ out_put:
goto out;
}
-void
-pnfs_return_layout_done(struct pnfs_layout_type *lo,
- struct nfs4_pnfs_layoutreturn *lrp,
- int rpc_status)
-{
- dprintk("--> %s\n", __func__);
-
- /* FIX-ME: If layoutreturn failed, we have already removed the
- * lseg from the cache...
- */
- pnfs_set_layout_stateid(lo, &lrp->res.stateid);
-
- dprintk("<-- %s\n", __func__);
-}
-
/*
* cmp two layout segments for sorting into layout cache
*/
--
1.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] SQUASHME pnfs-submit remove unused nfs4_filelayout fields
2010-07-15 16:33 [PATCH 1/4] SQUASHME pnfs-submit remove unused pnfs_return_layout_done andros
@ 2010-07-15 16:33 ` andros
2010-07-15 16:33 ` [PATCH 3/4] SQUASHME pnfs-submit nfs4filelayout.c cleanup andros
0 siblings, 1 reply; 4+ messages in thread
From: andros @ 2010-07-15 16:33 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.h | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h
index fd25e76..1de176d 100644
--- a/fs/nfs/nfs4filelayout.h
+++ b/fs/nfs/nfs4filelayout.h
@@ -69,9 +69,6 @@ struct nfs4_filelayout_segment {
struct nfs4_filelayout {
struct pnfs_layout_type fl_layout;
- int uncommitted_write;
- loff_t last_commit_size;
- u64 layout_id;
u32 stripe_unit;
};
--
1.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] SQUASHME pnfs-submit nfs4filelayout.c cleanup
2010-07-15 16:33 ` [PATCH 2/4] SQUASHME pnfs-submit remove unused nfs4_filelayout fields andros
@ 2010-07-15 16:33 ` andros
2010-07-15 16:33 ` [PATCH 4/4] SQUASHME pnfs-submit nfs4_filelayoutdev.c cleanup andros
0 siblings, 1 reply; 4+ messages in thread
From: andros @ 2010-07-15 16:33 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Cleanup comment formatting and lines greater than 80 characters.
Also remove an unecessary forward declaration and #if 0 code.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 66 ++++++++++++++++++++---------------------------
1 files changed, 28 insertions(+), 38 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index dc3ee0c..9b6ba8d 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -66,7 +66,6 @@ MODULE_DESCRIPTION("The NFSv4 file layout driver");
struct pnfs_client_operations *pnfs_callback_ops;
/* Forward declaration */
-ssize_t filelayout_get_stripesize(struct pnfs_layout_type *);
struct layoutdriver_io_operations filelayout_io_operations;
int
@@ -84,8 +83,7 @@ filelayout_initialize_mountpoint(struct nfs_client *clp)
return 0;
}
-/* Uninitialize a mountpoint by destroying its device list.
- */
+/* Uninitialize a mountpoint by destroying its device list */
int
filelayout_uninitialize_mountpoint(struct nfs_server *nfss)
{
@@ -128,7 +126,8 @@ filelayout_get_dserver_offset(struct pnfs_layout_segment *lseg, loff_t offset)
return 0;
}
-/* Call ops for the async read/write cases
+/*
+ * Call ops for the async read/write cases
* In the case of dense layouts, the offset needs to be reset to its
* original value.
*/
@@ -137,8 +136,8 @@ static void filelayout_read_call_done(struct rpc_task *task, void *data)
struct nfs_read_data *rdata = (struct nfs_read_data *)data;
if (rdata->fldata.orig_offset) {
- dprintk("%s new off %llu orig offset %llu\n",
- __func__, rdata->args.offset, rdata->fldata.orig_offset);
+ dprintk("%s new off %llu orig offset %llu\n", __func__,
+ rdata->args.offset, rdata->fldata.orig_offset);
rdata->args.offset = rdata->fldata.orig_offset;
}
@@ -160,8 +159,8 @@ static void filelayout_write_call_done(struct rpc_task *task, void *data)
struct nfs_write_data *wdata = (struct nfs_write_data *)data;
if (wdata->fldata.orig_offset) {
- dprintk("%s new off %llu orig offset %llu\n",
- __func__, wdata->args.offset, wdata->fldata.orig_offset);
+ dprintk("%s new off %llu orig offset %llu\n", __func__,
+ wdata->args.offset, wdata->fldata.orig_offset);
wdata->args.offset = wdata->fldata.orig_offset;
}
@@ -227,7 +226,8 @@ filelayout_read_pagelist(struct nfs_read_data *data, unsigned nr_pages)
if (fh)
data->args.fh = fh;
- /* Now get the file offset on the dserver
+ /*
+ * Now get the file offset on the dserver
* Set the read offset to this offset, and
* save the original offset in orig_offset
* In the case of aync reads, the offset will be reset in the
@@ -267,14 +267,15 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync)
fh = nfs4_fl_select_ds_fh(lseg, offset);
if (fh)
data->args.fh = fh;
-
- /* Get the file offset on the dserver. Set the write offset to
+ /*
+ * Get the file offset on the dserver. Set the write offset to
* this offset and save the original offset.
*/
data->args.offset = filelayout_get_dserver_offset(lseg, offset);
data->fldata.orig_offset = offset;
- /* Perform an asynchronous write The offset will be reset in the
+ /*
+ * Perform an asynchronous write The offset will be reset in the
* call_ops->rpc_call_done() routine
*/
nfs_initiate_write(data, ds->ds_clp->cl_rpcclient,
@@ -282,7 +283,8 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync)
return PNFS_ATTEMPTED;
}
-/* Create a filelayout layout structure and return it. The pNFS client
+/*
+ * Create a filelayout layout structure and return it. The pNFS client
* will use the pnfs_layout_type type to refer to the layout for this
* inode from now on.
*/
@@ -296,8 +298,7 @@ filelayout_alloc_layout(struct inode *inode)
return flp ? &flp->fl_layout : NULL;
}
-/* Free a filelayout layout structure
- */
+/* Free a filelayout layout structure */
static void
filelayout_free_layout(struct pnfs_layout_type *lo)
{
@@ -316,7 +317,7 @@ filelayout_free_layout(struct pnfs_layout_type *lo)
* 2) pattern_offset is ignored and must == 0 which is wrong;
* 3) the pattern_offset needs to be a mutliple of the stripe unit.
* 4) stripe unit is multiple of page size
-*/
+ */
static int
filelayout_check_layout(struct pnfs_layout_type *lo,
@@ -440,8 +441,7 @@ filelayout_set_layout(struct nfs4_filelayout *flo,
if (sizeof(struct nfs_fh) < fl->fh_array[i].size) {
printk(KERN_ERR "Too big fh %d received %d\n",
i, fl->fh_array[i].size);
- /* Layout is now invalid, so pretend it does not
- exist */
+ /* Layout is now invalid, pretend it doesn't exist */
filelayout_free_fh_array(fl);
fl->num_fh = 0;
break;
@@ -504,9 +504,7 @@ filelayout_free_lseg(struct pnfs_layout_segment *lseg)
_filelayout_free_lseg(lseg);
}
-/*
- * Allocate a new nfs_write_data struct and initialize
- */
+/* Allocate a new nfs_write_data struct and initialize */
static struct nfs_write_data *
filelayout_clone_write_data(struct nfs_write_data *old)
{
@@ -577,8 +575,8 @@ filelayout_commit(struct nfs_write_data *data, int sync)
if (!ds_page_list)
goto mem_error;
indices_used = (u16 *) (ds_page_list + NFS4_PNFS_MAX_MULTI_CNT + 1);
-
- /* Sort pages based on which ds to send to.
+ /*
+ * Sort pages based on which ds to send to.
* MDS is given index equal to NFS4_PNFS_MAX_MULTI_CNT.
* Note we are assuming there is only a single lseg in play.
* When that is not true, we could first sort on lseg, then
@@ -616,7 +614,8 @@ filelayout_commit(struct nfs_write_data *data, int sync)
goto mem_error;
}
clone_list[i] = data;
- /* Now send off the RPCs to each ds. Note that it is important
+ /*
+ * Now send off the RPCs to each ds. Note that it is important
* that any RPC to the MDS be sent last (or at least after all
* clones have been made.)
*/
@@ -675,8 +674,7 @@ filelayout_commit(struct nfs_write_data *data, int sync)
return PNFS_ATTEMPTED;
}
-/* Return the stripesize for the specified file.
- */
+/* Return the stripesize for the specified file */
ssize_t
filelayout_get_stripesize(struct pnfs_layout_type *layoutid)
{
@@ -702,18 +700,9 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
p_stripe = (u64)prev->wb_index << PAGE_CACHE_SHIFT;
r_stripe = (u64)req->wb_index << PAGE_CACHE_SHIFT;
-#if 0
- dprintk("%s p %llu r %llu \n", __func__, p_stripe, r_stripe);
-#endif
-
do_div(p_stripe, pgio->pg_boundary);
do_div(r_stripe, pgio->pg_boundary);
-#if 0
- dprintk("%s p %llu r %llu bnd %d bsize %Zu\n", __func__,
- p_stripe, r_stripe, pgio->pg_boundary, pgio->pg_bsize);
-#endif
-
return (p_stripe == r_stripe);
}
@@ -746,9 +735,10 @@ static int __init nfs4filelayout_init(void)
printk(KERN_INFO "%s: NFSv4 File Layout Driver Registering...\n",
__func__);
- /* Need to register file_operations struct with global list to indicate
- * that NFS4 file layout is a possible pNFS I/O module
- */
+ /*
+ * Need to register file_operations struct with global list to indicate
+ * that NFS4 file layout is a possible pNFS I/O module
+ */
pnfs_callback_ops = pnfs_register_layoutdriver(&filelayout_type);
return 0;
--
1.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] SQUASHME pnfs-submit nfs4_filelayoutdev.c cleanup
2010-07-15 16:33 ` [PATCH 3/4] SQUASHME pnfs-submit nfs4filelayout.c cleanup andros
@ 2010-07-15 16:33 ` andros
0 siblings, 0 replies; 4+ messages in thread
From: andros @ 2010-07-15 16:33 UTC (permalink / raw)
To: bhalevy; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Cleanup comment formatting and extra whitespace.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayoutdev.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index c2b8a0a..1452710 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -193,13 +193,11 @@ nfs4_pnfs_ds_create(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds)
err = -ENODEV;
goto out_put;
}
-
/*
* Mask the (possibly) returned EXCHGID4_FLAG_USE_PNFS_MDS pNFS role
* The is_ds_only_session depends on this.
*/
clp->cl_exchange_flags &= ~EXCHGID4_FLAG_USE_PNFS_MDS;
-
/*
* Set DS lease equal to the MDS lease, renewal is scheduled in
* create_session
@@ -327,8 +325,10 @@ decode_and_add_ds(uint32_t **pp, struct inode *inode)
__func__, len);
goto out_err;
}
- /* Read the bytes into a temporary buffer */
- /* XXX: should probably sanity check them */
+ /*
+ * Read the bytes into a temporary buffer
+ * XXX: should probably sanity check them
+ */
tmp[0] = be32_to_cpup(p++);
len = be32_to_cpup(p++);
@@ -355,8 +355,7 @@ out_err:
return NULL;
}
-/* Decode opaque device data and return the result
- */
+/* Decode opaque device data and return the result */
static struct nfs4_file_layout_dsaddr*
decode_device(struct inode *ino, struct pnfs_device *pdev)
{
@@ -476,7 +475,8 @@ decode_and_add_device(struct inode *inode, struct pnfs_device *dev)
return container_of(d, struct nfs4_file_layout_dsaddr, deviceid);
}
-/* Retrieve the information for dev_id, add it to the list
+/*
+ * Retrieve the information for dev_id, add it to the list
* of available devices, and return it.
*/
struct nfs4_file_layout_dsaddr *
@@ -533,7 +533,8 @@ get_device_info(struct inode *inode, struct pnfs_deviceid *dev_id)
if (rc)
goto out_free;
- /* Found new device, need to decode it and then add it to the
+ /*
+ * Found new device, need to decode it and then add it to the
* list of known devices for this mountpoint.
*/
dsaddr = decode_and_add_device(inode, pdev);
@@ -560,7 +561,8 @@ nfs4_pnfs_device_item_find(struct nfs_client *clp, struct pnfs_deviceid *id)
container_of(d, struct nfs4_file_layout_dsaddr, deviceid);
}
-/* Want res = (offset - layout->pattern_offset)/ layout->stripe_unit
+/*
+ * Want res = (offset - layout->pattern_offset)/ layout->stripe_unit
* Then: ((res + fsi) % dsaddr->stripe_count)
*/
static inline u32
--
1.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-15 16:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15 16:33 [PATCH 1/4] SQUASHME pnfs-submit remove unused pnfs_return_layout_done andros
2010-07-15 16:33 ` [PATCH 2/4] SQUASHME pnfs-submit remove unused nfs4_filelayout fields andros
2010-07-15 16:33 ` [PATCH 3/4] SQUASHME pnfs-submit nfs4filelayout.c cleanup andros
2010-07-15 16:33 ` [PATCH 4/4] SQUASHME pnfs-submit nfs4_filelayoutdev.c cleanup andros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).