From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIKMH-0005Wi-8s for qemu-devel@nongnu.org; Mon, 02 Feb 2015 12:00:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIKMC-00071D-A7 for qemu-devel@nongnu.org; Mon, 02 Feb 2015 12:00:21 -0500 Received: from mx2.parallels.com ([199.115.105.18]:52319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIKMC-00070s-22 for qemu-devel@nongnu.org; Mon, 02 Feb 2015 12:00:16 -0500 Message-ID: <54CFAD15.6080702@openvz.org> Date: Mon, 2 Feb 2015 20:00:05 +0300 From: "Denis V. Lunev" MIME-Version: 1.0 References: <1422888514-6495-1-git-send-email-pl@kamp.de> <20150202161332.GK9478@noname.redhat.com> <54CFA4DE.702@openvz.org> <20150202164503.GA19586@noname.redhat.com> In-Reply-To: <20150202164503.GA19586@noname.redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: change default for discard and write zeroes to INT_MAX List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Peter Lieven , qemu-devel@nongnu.org On 02/02/15 19:45, Kevin Wolf wrote: > Am 02.02.2015 um 17:25 hat Denis V. Lunev geschrieben: >> On 02/02/15 19:13, Kevin Wolf wrote: >>> Am 02.02.2015 um 15:48 hat Peter Lieven geschrieben: >>>> do not trim requests if the driver does not supply a limit >>>> through BlockLimits. For write zeroes we still keep a limit >>>> for the unsupported path to avoid allocating a big bounce buffer. >>>> >>>> Suggested-by: Kevin Wolf >>>> Suggested-by: Denis V. Lunev >>>> Signed-off-by: Peter Lieven >>> Thanks, applied to the block branch (and removed 'block/raw-posix: set >>> max_write_zeroes to INT_MAX for regular files' from the queue). >>> >>> Kevin >> double checked the code. >> >> There are 2 things to patch for discard, write_zeroes is OK for me. >> Sorry, for not paying attention for discard branch :( > Good catch, thanks! > > But shouldn't we use the actual limits instead of INT_MAX, i.e. SIZE_MAX > for gluster and UINT32_MAX for nbd? > > Kevin You are absolutely correct for NBD case but I do not get the point about SIZE_MAX for gluster. There is no such definition in their git at git://github.com/gluster/glusterfs nor in public API headers in Ubuntu :( Regards, Den