From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1307521A04E03 for ; Wed, 10 May 2017 11:02:40 -0700 (PDT) From: Christoph Hellwig Subject: [PATCH 06/16] afs: switch to use uuid_t and uuid_gen Date: Wed, 10 May 2017 20:02:04 +0200 Message-Id: <20170510180214.16852-7-hch@lst.de> In-Reply-To: <20170510180214.16852-1-hch@lst.de> References: <20170510180214.16852-1-hch@lst.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Andy Shevchenko , Amir Goldstein , linux-fsdevel@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvdimm@lists.01.org, Shaohua Li , linux-kernel@vger.kernel.org, David Howells , Mimi Zohar , Steven Whitehouse List-ID: Signed-off-by: Christoph Hellwig --- fs/afs/cmservice.c | 46 +++++++++++++++++++++++----------------------- fs/afs/internal.h | 2 +- fs/afs/main.c | 4 ++-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 3062cceb5c2a..d4e77d12570c 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -350,7 +350,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) { struct sockaddr_rxrpc srx; struct afs_server *server; - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -380,20 +380,20 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -453,7 +453,7 @@ static int afs_deliver_cb_probe(struct afs_call *call) static void SRXAFSCB_ProbeUuid(struct work_struct *work) { struct afs_call *call = container_of(work, struct afs_call, work); - struct uuid_v1 *r = call->request; + uuid_t *r = call->request; struct { __be32 match; @@ -476,7 +476,7 @@ static void SRXAFSCB_ProbeUuid(struct work_struct *work) */ static int afs_deliver_cb_probe_uuid(struct afs_call *call) { - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -502,20 +502,20 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -568,13 +568,13 @@ static void SRXAFSCB_TellMeAboutYourself(struct work_struct *work) memset(&reply, 0, sizeof(reply)); reply.ia.nifs = htonl(nifs); - reply.ia.uuid[0] = afs_uuid.time_low; - reply.ia.uuid[1] = htonl(ntohs(afs_uuid.time_mid)); - reply.ia.uuid[2] = htonl(ntohs(afs_uuid.time_hi_and_version)); - reply.ia.uuid[3] = htonl((s8) afs_uuid.clock_seq_hi_and_reserved); - reply.ia.uuid[4] = htonl((s8) afs_uuid.clock_seq_low); + reply.ia.uuid[0] = afs_uuid.v1.time_low; + reply.ia.uuid[1] = htonl(ntohs(afs_uuid.v1.time_mid)); + reply.ia.uuid[2] = htonl(ntohs(afs_uuid.v1.time_hi_and_version)); + reply.ia.uuid[3] = htonl((s8) afs_uuid.v1.clock_seq_hi_and_reserved); + reply.ia.uuid[4] = htonl((s8) afs_uuid.v1.clock_seq_low); for (loop = 0; loop < 6; loop++) - reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.node[loop]); + reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.v1.node[loop]); if (ifs) { for (loop = 0; loop < nifs; loop++) { diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 393672997cc2..7de45c8686a2 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -544,7 +544,7 @@ extern int afs_drop_inode(struct inode *); * main.c */ extern struct workqueue_struct *afs_wq; -extern struct uuid_v1 afs_uuid; +extern uuid_t afs_uuid; /* * misc.c diff --git a/fs/afs/main.c b/fs/afs/main.c index 51d7d17bca57..75b3d3a8b1ba 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -31,7 +31,7 @@ static char *rootcell; module_param(rootcell, charp, 0); MODULE_PARM_DESC(rootcell, "root AFS cell name and VL server IP addr list"); -struct uuid_v1 afs_uuid; +uuid_t afs_uuid; struct workqueue_struct *afs_wq; /* @@ -43,7 +43,7 @@ static int __init afs_init(void) printk(KERN_INFO "kAFS: Red Hat AFS client v0.1 registering.\n"); - generate_random_uuid((unsigned char *)&afs_uuid); + uuid_gen(&afs_uuid); /* create workqueue */ ret = -ENOMEM; -- 2.11.0 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH 06/16] afs: switch to use uuid_t and uuid_gen Date: Wed, 10 May 2017 20:02:04 +0200 Message-ID: <20170510180214.16852-7-hch@lst.de> References: <20170510180214.16852-1-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170510180214.16852-1-hch-jcswGhMUV9g@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Andy Shevchenko , Amir Goldstein , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, Shaohua Li , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells , Mimi Zohar , Steven Whitehouse List-Id: linux-raid.ids Signed-off-by: Christoph Hellwig --- fs/afs/cmservice.c | 46 +++++++++++++++++++++++----------------------- fs/afs/internal.h | 2 +- fs/afs/main.c | 4 ++-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 3062cceb5c2a..d4e77d12570c 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -350,7 +350,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) { struct sockaddr_rxrpc srx; struct afs_server *server; - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -380,20 +380,20 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -453,7 +453,7 @@ static int afs_deliver_cb_probe(struct afs_call *call) static void SRXAFSCB_ProbeUuid(struct work_struct *work) { struct afs_call *call = container_of(work, struct afs_call, work); - struct uuid_v1 *r = call->request; + uuid_t *r = call->request; struct { __be32 match; @@ -476,7 +476,7 @@ static void SRXAFSCB_ProbeUuid(struct work_struct *work) */ static int afs_deliver_cb_probe_uuid(struct afs_call *call) { - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -502,20 +502,20 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -568,13 +568,13 @@ static void SRXAFSCB_TellMeAboutYourself(struct work_struct *work) memset(&reply, 0, sizeof(reply)); reply.ia.nifs = htonl(nifs); - reply.ia.uuid[0] = afs_uuid.time_low; - reply.ia.uuid[1] = htonl(ntohs(afs_uuid.time_mid)); - reply.ia.uuid[2] = htonl(ntohs(afs_uuid.time_hi_and_version)); - reply.ia.uuid[3] = htonl((s8) afs_uuid.clock_seq_hi_and_reserved); - reply.ia.uuid[4] = htonl((s8) afs_uuid.clock_seq_low); + reply.ia.uuid[0] = afs_uuid.v1.time_low; + reply.ia.uuid[1] = htonl(ntohs(afs_uuid.v1.time_mid)); + reply.ia.uuid[2] = htonl(ntohs(afs_uuid.v1.time_hi_and_version)); + reply.ia.uuid[3] = htonl((s8) afs_uuid.v1.clock_seq_hi_and_reserved); + reply.ia.uuid[4] = htonl((s8) afs_uuid.v1.clock_seq_low); for (loop = 0; loop < 6; loop++) - reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.node[loop]); + reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.v1.node[loop]); if (ifs) { for (loop = 0; loop < nifs; loop++) { diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 393672997cc2..7de45c8686a2 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -544,7 +544,7 @@ extern int afs_drop_inode(struct inode *); * main.c */ extern struct workqueue_struct *afs_wq; -extern struct uuid_v1 afs_uuid; +extern uuid_t afs_uuid; /* * misc.c diff --git a/fs/afs/main.c b/fs/afs/main.c index 51d7d17bca57..75b3d3a8b1ba 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -31,7 +31,7 @@ static char *rootcell; module_param(rootcell, charp, 0); MODULE_PARM_DESC(rootcell, "root AFS cell name and VL server IP addr list"); -struct uuid_v1 afs_uuid; +uuid_t afs_uuid; struct workqueue_struct *afs_wq; /* @@ -43,7 +43,7 @@ static int __init afs_init(void) printk(KERN_INFO "kAFS: Red Hat AFS client v0.1 registering.\n"); - generate_random_uuid((unsigned char *)&afs_uuid); + uuid_gen(&afs_uuid); /* create workqueue */ ret = -ENOMEM; -- 2.11.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932306AbdEJSFf (ORCPT ); Wed, 10 May 2017 14:05:35 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:40411 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754206AbdEJSCp (ORCPT ); Wed, 10 May 2017 14:02:45 -0400 From: Christoph Hellwig To: Andy Shevchenko , Amir Goldstein , linux-fsdevel@vger.kernel.org Cc: Shaohua Li , Dan Williams , David Howells , Steven Whitehouse , Mimi Zohar , linux-xfs@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/16] afs: switch to use uuid_t and uuid_gen Date: Wed, 10 May 2017 20:02:04 +0200 Message-Id: <20170510180214.16852-7-hch@lst.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170510180214.16852-1-hch@lst.de> References: <20170510180214.16852-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Christoph Hellwig --- fs/afs/cmservice.c | 46 +++++++++++++++++++++++----------------------- fs/afs/internal.h | 2 +- fs/afs/main.c | 4 ++-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 3062cceb5c2a..d4e77d12570c 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -350,7 +350,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) { struct sockaddr_rxrpc srx; struct afs_server *server; - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -380,20 +380,20 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -453,7 +453,7 @@ static int afs_deliver_cb_probe(struct afs_call *call) static void SRXAFSCB_ProbeUuid(struct work_struct *work) { struct afs_call *call = container_of(work, struct afs_call, work); - struct uuid_v1 *r = call->request; + uuid_t *r = call->request; struct { __be32 match; @@ -476,7 +476,7 @@ static void SRXAFSCB_ProbeUuid(struct work_struct *work) */ static int afs_deliver_cb_probe_uuid(struct afs_call *call) { - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -502,20 +502,20 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -568,13 +568,13 @@ static void SRXAFSCB_TellMeAboutYourself(struct work_struct *work) memset(&reply, 0, sizeof(reply)); reply.ia.nifs = htonl(nifs); - reply.ia.uuid[0] = afs_uuid.time_low; - reply.ia.uuid[1] = htonl(ntohs(afs_uuid.time_mid)); - reply.ia.uuid[2] = htonl(ntohs(afs_uuid.time_hi_and_version)); - reply.ia.uuid[3] = htonl((s8) afs_uuid.clock_seq_hi_and_reserved); - reply.ia.uuid[4] = htonl((s8) afs_uuid.clock_seq_low); + reply.ia.uuid[0] = afs_uuid.v1.time_low; + reply.ia.uuid[1] = htonl(ntohs(afs_uuid.v1.time_mid)); + reply.ia.uuid[2] = htonl(ntohs(afs_uuid.v1.time_hi_and_version)); + reply.ia.uuid[3] = htonl((s8) afs_uuid.v1.clock_seq_hi_and_reserved); + reply.ia.uuid[4] = htonl((s8) afs_uuid.v1.clock_seq_low); for (loop = 0; loop < 6; loop++) - reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.node[loop]); + reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.v1.node[loop]); if (ifs) { for (loop = 0; loop < nifs; loop++) { diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 393672997cc2..7de45c8686a2 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -544,7 +544,7 @@ extern int afs_drop_inode(struct inode *); * main.c */ extern struct workqueue_struct *afs_wq; -extern struct uuid_v1 afs_uuid; +extern uuid_t afs_uuid; /* * misc.c diff --git a/fs/afs/main.c b/fs/afs/main.c index 51d7d17bca57..75b3d3a8b1ba 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -31,7 +31,7 @@ static char *rootcell; module_param(rootcell, charp, 0); MODULE_PARM_DESC(rootcell, "root AFS cell name and VL server IP addr list"); -struct uuid_v1 afs_uuid; +uuid_t afs_uuid; struct workqueue_struct *afs_wq; /* @@ -43,7 +43,7 @@ static int __init afs_init(void) printk(KERN_INFO "kAFS: Red Hat AFS client v0.1 registering.\n"); - generate_random_uuid((unsigned char *)&afs_uuid); + uuid_gen(&afs_uuid); /* create workqueue */ ret = -ENOMEM; -- 2.11.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Christoph Hellwig To: Andy Shevchenko , Amir Goldstein , linux-fsdevel@vger.kernel.org Cc: Shaohua Li , Dan Williams , David Howells , Steven Whitehouse , Mimi Zohar , linux-xfs@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/16] afs: switch to use uuid_t and uuid_gen Date: Wed, 10 May 2017 20:02:04 +0200 Message-Id: <20170510180214.16852-7-hch@lst.de> In-Reply-To: <20170510180214.16852-1-hch@lst.de> References: <20170510180214.16852-1-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: Signed-off-by: Christoph Hellwig --- fs/afs/cmservice.c | 46 +++++++++++++++++++++++----------------------- fs/afs/internal.h | 2 +- fs/afs/main.c | 4 ++-- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 3062cceb5c2a..d4e77d12570c 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -350,7 +350,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) { struct sockaddr_rxrpc srx; struct afs_server *server; - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -380,20 +380,20 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -453,7 +453,7 @@ static int afs_deliver_cb_probe(struct afs_call *call) static void SRXAFSCB_ProbeUuid(struct work_struct *work) { struct afs_call *call = container_of(work, struct afs_call, work); - struct uuid_v1 *r = call->request; + uuid_t *r = call->request; struct { __be32 match; @@ -476,7 +476,7 @@ static void SRXAFSCB_ProbeUuid(struct work_struct *work) */ static int afs_deliver_cb_probe_uuid(struct afs_call *call) { - struct uuid_v1 *r; + uuid_t *r; unsigned loop; __be32 *b; int ret; @@ -502,20 +502,20 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); + call->request = kmalloc(sizeof(uuid_t), GFP_KERNEL); if (!call->request) return -ENOMEM; b = call->buffer; r = call->request; - r->time_low = b[0]; - r->time_mid = htons(ntohl(b[1])); - r->time_hi_and_version = htons(ntohl(b[2])); - r->clock_seq_hi_and_reserved = ntohl(b[3]); - r->clock_seq_low = ntohl(b[4]); + r->v1.time_low = b[0]; + r->v1.time_mid = htons(ntohl(b[1])); + r->v1.time_hi_and_version = htons(ntohl(b[2])); + r->v1.clock_seq_hi_and_reserved = ntohl(b[3]); + r->v1.clock_seq_low = ntohl(b[4]); for (loop = 0; loop < 6; loop++) - r->node[loop] = ntohl(b[loop + 5]); + r->v1.node[loop] = ntohl(b[loop + 5]); call->offset = 0; call->unmarshall++; @@ -568,13 +568,13 @@ static void SRXAFSCB_TellMeAboutYourself(struct work_struct *work) memset(&reply, 0, sizeof(reply)); reply.ia.nifs = htonl(nifs); - reply.ia.uuid[0] = afs_uuid.time_low; - reply.ia.uuid[1] = htonl(ntohs(afs_uuid.time_mid)); - reply.ia.uuid[2] = htonl(ntohs(afs_uuid.time_hi_and_version)); - reply.ia.uuid[3] = htonl((s8) afs_uuid.clock_seq_hi_and_reserved); - reply.ia.uuid[4] = htonl((s8) afs_uuid.clock_seq_low); + reply.ia.uuid[0] = afs_uuid.v1.time_low; + reply.ia.uuid[1] = htonl(ntohs(afs_uuid.v1.time_mid)); + reply.ia.uuid[2] = htonl(ntohs(afs_uuid.v1.time_hi_and_version)); + reply.ia.uuid[3] = htonl((s8) afs_uuid.v1.clock_seq_hi_and_reserved); + reply.ia.uuid[4] = htonl((s8) afs_uuid.v1.clock_seq_low); for (loop = 0; loop < 6; loop++) - reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.node[loop]); + reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.v1.node[loop]); if (ifs) { for (loop = 0; loop < nifs; loop++) { diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 393672997cc2..7de45c8686a2 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -544,7 +544,7 @@ extern int afs_drop_inode(struct inode *); * main.c */ extern struct workqueue_struct *afs_wq; -extern struct uuid_v1 afs_uuid; +extern uuid_t afs_uuid; /* * misc.c diff --git a/fs/afs/main.c b/fs/afs/main.c index 51d7d17bca57..75b3d3a8b1ba 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -31,7 +31,7 @@ static char *rootcell; module_param(rootcell, charp, 0); MODULE_PARM_DESC(rootcell, "root AFS cell name and VL server IP addr list"); -struct uuid_v1 afs_uuid; +uuid_t afs_uuid; struct workqueue_struct *afs_wq; /* @@ -43,7 +43,7 @@ static int __init afs_init(void) printk(KERN_INFO "kAFS: Red Hat AFS client v0.1 registering.\n"); - generate_random_uuid((unsigned char *)&afs_uuid); + uuid_gen(&afs_uuid); /* create workqueue */ ret = -ENOMEM; -- 2.11.0