From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Xkp-0002LJ-Vt for qemu-devel@nongnu.org; Tue, 01 Nov 2016 08:01:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1Xkm-0005uk-Tm for qemu-devel@nongnu.org; Tue, 01 Nov 2016 08:01:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55573) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1Xkm-0005uT-KG for qemu-devel@nongnu.org; Tue, 01 Nov 2016 08:01:20 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA1Bx17F034841 for ; Tue, 1 Nov 2016 08:01:19 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 26eg6rkjha-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 01 Nov 2016 08:01:18 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Nov 2016 12:01:16 -0000 From: Greg Kurz Date: Tue, 1 Nov 2016 13:00:51 +0100 In-Reply-To: <1478001656-5766-1-git-send-email-groug@kaod.org> References: <1478001656-5766-1-git-send-email-groug@kaod.org> Message-Id: <1478001656-5766-3-git-send-email-groug@kaod.org> Subject: [Qemu-devel] [PULL v2 for-2.8 2/7] 9pfs: convert 'len/copied_len' field in V9fsXattr to the type of uint64_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , "Aneesh Kumar K.V" , Greg Kurz , Li Qiang From: Li Qiang The 'len' in V9fsXattr comes from the 'size' argument in setxattr() function in guest. The setxattr() function's declaration is this: int setxattr(const char *path, const char *name, const void *value, size_t size, int flags); and 'size' is treated as u64 in linux kernel client code: int p9_client_xattrcreate(struct p9_fid *fid, const char *name, u64 attr_size, int flags) So the 'len' should have an type of 'uint64_t'. The 'copied_len' in V9fsXattr is used to account for copied bytes, it should also have an type of 'uint64_t'. Suggested-by: Greg Kurz Signed-off-by: Li Qiang Reviewed-by: Greg Kurz Signed-off-by: Greg Kurz --- hw/9pfs/9p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index 48065cc22169..3976b7fe3dcd 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -159,8 +159,8 @@ typedef struct V9fsConf typedef struct V9fsXattr { - int64_t copied_len; - int64_t len; + uint64_t copied_len; + uint64_t len; void *value; V9fsString name; int flags; -- 2.5.5