Received: from eggs.gnu.org ([2001:4830:134:3::10]:57880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0pK8-0003YN-41 for qemu-devel@nongnu.org; Sun, 30 Oct 2016 08:34:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0pK5-0001q2-1E for qemu-devel@nongnu.org; Sun, 30 Oct 2016 08:34:52 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47969) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c0pK4-0001pc-OW for qemu-devel@nongnu.org; Sun, 30 Oct 2016 08:34:48 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9UCXOA4002043 for ; Sun, 30 Oct 2016 08:34:47 -0400 Received: from e06smtp08.uk.ibm.com (e06smtp08.uk.ibm.com [195.75.94.104]) by mx0a-001b2d01.pphosted.com with ESMTP id 26cp3eyyus-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 30 Oct 2016 08:34:47 -0400 Received: from localhost by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 30 Oct 2016 12:34:45 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 527361B08023 for ; Sun, 30 Oct 2016 12:36:51 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9UCYgXl11665890 for ; Sun, 30 Oct 2016 12:34:42 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9UCYfD7022063 for ; Sun, 30 Oct 2016 06:34:42 -0600 From: Greg Kurz Date: Sun, 30 Oct 2016 13:34:23 +0100 In-Reply-To: <1477830868-12274-1-git-send-email-groug@kaod.org> References: <1477830868-12274-1-git-send-email-groug@kaod.org> Message-Id: <1477830868-12274-3-git-send-email-groug@kaod.org> Subject: [Qemu-devel] [PULL 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 --- 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