From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Priebe - Profihost AG Subject: Re: [Qemu-devel] [PATCH] use int64_t for return values from rbd instead of int Date: Thu, 22 Nov 2012 09:23:49 +0100 Message-ID: <50ADE115.4060707@profihost.ag> References: <1353415495-30561-1-git-send-email-s.priebe@profihost.ag> <50AD096E.9080002@weilnetz.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: pve-devel-bounces-KmHT29P9Uc/4CZzEM2C48g@public.gmane.org Errors-To: pve-devel-bounces-KmHT29P9Uc/4CZzEM2C48g@public.gmane.org To: Peter Maydell Cc: Stefan Hajnoczi , Stefan Weil , qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, pve-devel-KmHT29P9Uc/4CZzEM2C48g@public.gmane.org, pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, josh.durgin-4GqslpFJ+cxBDgjK7y7TUQ@public.gmane.org, ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: ceph-devel.vger.kernel.org Am 21.11.2012 23:32, schrieb Peter Maydell: > On 21 November 2012 17:03, Stefan Weil wrote: >> Why do you use int64_t instead of off_t? >> If the value is related to file sizes, off_t would be a good choice. > > Looking at the librbd API (which is what the size and ret > values come from), it uses size_t and ssize_t for these. > So I think probably ssize_t is the right type for ret > (and size) in our structs here. This sounds reasonable but does ssize_t support negative values? For error values. Greets, Stefan