Skip to contentSkip to conversation

pnfs: Fix num_ds bug in nfsd4_set_pnfs_dlm_device()

PATCH In review Eric Anderle 2 participants 2 messages Jun 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pnfs: Fix num_ds bug in nfsd4_set_pnfs_dlm_device()

Quoted 1 line

From cd18db8401e1df4ee031e6a6c53e0f3353080dca Mon Sep 17 00:00:00 2001

From: Eric Anderle <[email protected]>
Date: Fri, 18 Jun 2010 10:09:46 -0400
Subject: [PATCH 1/1] pnfs: Fix num_ds bug in nfsd4_set_pnfs_dlm_device()

Previously, when updating the DS list of an existing pnfs dlm device, the number of ds's was not updated. Fixed.

---
 fs/nfsd/nfs4pnfsdlm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfsd/nfs4pnfsdlm.c +1 -0
index 40f9b84..ffe1c32 100644
@@ -189,6 +189,7 @@ nfsd4_set_pnfs_dlm_device(char *pnfs_dlm_device, int len)
 			found->disk_name, found->ds_list, new->ds_list);
 		memset(found->ds_list, 0, DISK_NAME_LEN);
 		memcpy(found->ds_list, new->ds_list, strlen(new->ds_list));
+		found->num_ds = new->num_ds;
 		kfree(new);
 	} else {
 		dprintk("%s Adding pnfs_dlm_device %s:%s\n", __func__,
Signature · 1 line
1.7.0.4
#1 lore raw

Merged at pnfs-all-2.6.35-rc3-2010-06-18

Quoted 4 lines · Eric Anderle
Quoted 1 line

From cd18db8401e1df4ee031e6a6c53e0f3353080dca Mon Sep 17 00:00:00 2001

From: Eric Anderle <[email protected]>
Date: Fri, 18 Jun 2010 10:09:46 -0400
Subject: [PATCH 1/1] pnfs: Fix num_ds bug in nfsd4_set_pnfs_dlm_device()

Oh, and one more nit :)
since this patch is for the server, our convention is to prefix its subject with "pnfsd:", not "pnfs:"

Thanks!

Benny

Quoted 21 lines

Previously, when updating the DS list of an existing pnfs dlm device, the number of ds's was not updated. Fixed.

---
 fs/nfsd/nfs4pnfsdlm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfsd/nfs4pnfsdlm.c +1 -0
index 40f9b84..ffe1c32 100644
@@ -189,6 +189,7 @@ nfsd4_set_pnfs_dlm_device(char *pnfs_dlm_device, int len)
 			found->disk_name, found->ds_list, new->ds_list);
 		memset(found->ds_list, 0, DISK_NAME_LEN);
 		memcpy(found->ds_list, new->ds_list, strlen(new->ds_list));
+		found->num_ds = new->num_ds;
 		kfree(new);
 	} else {
 		dprintk("%s Adding pnfs_dlm_device %s:%s\n", __func__,