From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2KTN-0003yh-N3 for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:16:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2KTI-0004DP-OJ for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:16:45 -0400 Received: from mail-gg0-x22d.google.com ([2607:f8b0:4002:c02::22d]:37572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2KTI-0004DF-Kt for qemu-devel@nongnu.org; Thu, 25 Jul 2013 08:16:40 -0400 Received: by mail-gg0-f173.google.com with SMTP id k5so365543ggn.4 for ; Thu, 25 Jul 2013 05:16:40 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51F11716.1080309@redhat.com> Date: Thu, 25 Jul 2013 14:16:22 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1373992168-26043-1-git-send-email-pbonzini@redhat.com> <1373992168-26043-15-git-send-email-pbonzini@redhat.com> <51E99819.9040803@redhat.com> In-Reply-To: <51E99819.9040803@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 14/17] raw-posix: return get_block_status data and flags List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: pl@kamp.de, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 19/07/2013 21:48, Eric Blake ha scritto: >>> start = sector_num * BDRV_SECTOR_SIZE; + ret = >>> BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | start; > off_t is a signed type; if you are compiling on a platform with > 32-bit off_t, is it possible that you will get unintended sign > extension for values of 'start' between 2 and 4 GB? Or are such > files already impossible to open? [Or do we intentionally require > off_t be 64-bits on all platforms we care about?] Good question. If we don't, we should. In the meanwhile, I'll change start/data/hole to be int64_t. Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJR8RcVAAoJEBvWZb6bTYbymN0P/15/doObltN+2vCE1WtQD8IZ Woqd/Itct/1KXHCLv423ThO23/WpE3KSPna25a19sGeJQSXdZB7E2shDtxNErEob a0c0n6yMzDI0iU+UX1/mPacoIZt5tiWHzd3W4sTIgVDjHUa1Xctgp8bv3gNFNHzh Ese6mdNNhJQCPqA67qLhzSGfnWUCxGV0F9HDK23dfYJUQ8yoEnRWqLYjRH0qgEG4 LRydUCyfU3BjvmRlLLRMrJHxSJKQKbYMO94IY1ZPqKn1TxKPnOHdIYOgNP8wFAWA 3uA5kc0r9qEmSyh01dbQ+bBkp9lRzDRgxrmii4LZXiQvF6kAXxrY5fEuUHrewGwC 1KeFccGLkgWH1jI19M8URjzbjQwGm79yYIqlt4ZLDwam88VXlxYse7odaRESGSWY HQqak7WSlDFPlvNj7eR3lruGN3E9F6XAoMCVwRnPRbrx9G9ezH302VF7IXHvlFJu yK+iRwoWUSkKPWVBxiMrI5HAWlt4N6Akje2VPhkaJQYBQ0LwLhMiDWfMJySW9M7I qNz/CjbMljwEGOEjYZ7PUKd0H76mcX1xwDi3ofBkJn3Bu74+C5xs7ZRRNO/tIu2c mVxxYbP7R3dTDdF6sOTVIjUt9M7ObDJ0I0Y0aev1BSTv5tiZb9KB+ef9DRn2Drhk cVcuJYJiEvL3JV9J5zDE =ANdZ -----END PGP SIGNATURE-----