Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp626413imm; Tue, 5 Jun 2018 01:35:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI3cNqJBeuZhWpAyCZjz43gdxBFnFU3By2rkIbkiGPNkD4+xXzJCki1iZ4iOqxyC8QDYc/D X-Received: by 2002:a65:46cb:: with SMTP id n11-v6mr19560725pgr.193.1528187725595; Tue, 05 Jun 2018 01:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528187725; cv=none; d=google.com; s=arc-20160816; b=yeudseq3hmrfrE51Sefyfvqbj7UeDYW5TDcdEPKPhttB8YzU27JteaEkkTWk9OhCcc ka6i8Gr8qk+O+4zLndIhervNy4KDJnCMCw/GVXN5ucNMogqN5ZzmJ+oVjuRViGA8vfu1 vp8K6di/7RCGChdrT1LTVIidBjxScCeg7dUn0j+xigN7bsC2XY5Gd0lqXlu64VMHpHnW rPIRDMjJ0N/XIXKOw0HECM8mB3oMmmrcZxh5SsykUCTnERyw9xiUKwuqDcfmOMjsCIV1 0C+QFXGU0vv0wyzb8JPqw9Z0cs2Cm2x5Z1JXVaPaOowDy6I3oRFrG3Uz51t+Bt7U1BFJ si3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=SHDpLKeFIJ7qtdKCkGNkyfSm7WzA+sE5efb9AeASOIg=; b=iDVnuGGZpNicLkREQ8pwhOFqqnCYlvDPJcEIkP613QBBmRlOZ6wve+njfoNStDscQB JpE04+L4IHXjRZNsZtfGhEXXSY3exTXkEbd9BGSyskpdTh6f/AersII7uiwtlIxUUioA 0++LPV31IGIcCy4eMWaTkuKlBh4Dw+0qknWDqlFI9wKpsyI6h8figKzgkQgyN1vn6Sqb OxhBp32qRXq+n+MOzHk5v00xZYaBTjs3CBIoh+MKfhO8uWE8EV32bh3I3vhw5VS2IRBN 3G5ck1ZIQ87a/COgOhi+Wd7FrYhEU6RORCBxT15ACMO88BevwBuw8PSe1Jd3fAxcTyJg vjHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=N8WfN+dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y17-v6si32320456plp.485.2018.06.05.01.35.11; Tue, 05 Jun 2018 01:35:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=N8WfN+dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751554AbeFEId0 (ORCPT + 99 others); Tue, 5 Jun 2018 04:33:26 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:37575 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751502AbeFEIdX (ORCPT ); Tue, 5 Jun 2018 04:33:23 -0400 Received: by mail-ot0-f195.google.com with SMTP id 101-v6so1803317oth.4 for ; Tue, 05 Jun 2018 01:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SHDpLKeFIJ7qtdKCkGNkyfSm7WzA+sE5efb9AeASOIg=; b=N8WfN+dkwWojPBsxsKSqULLt/+nhSf9c8ljk+g26RlQHE7+xHGx8xkvJXbPWcAUmag W2/xORk/D0dlqZIven3lcBV8ggxnalhWX4eBBR92YBLpukxjx5yOZnTztpnf6aYJkTF3 XBqLiEXGwXqy2HrlSpJTALx7o33Udvsf/xgsA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SHDpLKeFIJ7qtdKCkGNkyfSm7WzA+sE5efb9AeASOIg=; b=ah7IJJWoqUxq2QhPw5ZWXWMgPNn00+wxquFoXOS4Wyk6Gyz7JZINNwY88z1RUrhLUv f03E6323ULI2G/+ukNB3ZJ/5cltnnIWuXdyBFJSHxpmXQ2tDoO2cPov0c0RwtaOKjKRx gBWVR4hPUygLY02q2kxgmbNrkdVEgbqqcgDX7PXq2jRsrCwmkQxQY6vsp0XR92W41/Yx 17PFRxdm0eJ/CnXiXeVOoa2WXYHMkR65N8v42HnoVJ9Zd5vZZWFMSq8gw0VFQjb5sz4F c43nSD7JiPzD9AAbMB1tB/4vM3Kn7SjZvj9LXTvoCBeJrOU5irgVdOKKyM01r6/QtFWp LTqQ== X-Gm-Message-State: APt69E2qutdrkrNpgQH/Kg9FAmbzTqjbnvCma5xdoKDj98JhgFdfxF2n L98QSWLllvBZDi4ZFAg8HBt3Hihi8qwF1ODnjsV3+g== X-Received: by 2002:a9d:4c02:: with SMTP id l2-v6mr5716262otf.242.1528187603209; Tue, 05 Jun 2018 01:33:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1123:0:0:0:0:0 with HTTP; Tue, 5 Jun 2018 01:33:22 -0700 (PDT) X-Originating-IP: [194.176.227.33] In-Reply-To: <20180604084336.GA11333@infradead.org> References: <20180529144339.16538-1-mszeredi@redhat.com> <20180529144339.16538-2-mszeredi@redhat.com> <20180604084336.GA11333@infradead.org> From: Miklos Szeredi Date: Tue, 5 Jun 2018 10:33:22 +0200 Message-ID: Subject: Re: [PATCH 01/39] vfs: dedpue: return loff_t To: Christoph Hellwig Cc: Miklos Szeredi , overlayfs , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs , ocfs2-devel@oss.oracle.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 4, 2018 at 10:43 AM, Christoph Hellwig wrote: > On Tue, May 29, 2018 at 04:43:01PM +0200, Miklos Szeredi wrote: >> f_op->dedupe_file_range() gets a u64 length to dedup and returns an ssize_t >> actual length deduped. This breaks badly on 32bit archs since the returned >> length will be truncated and possibly overflow into the sign bit (xfs and >> ocfs2 are affected, btrfs limits actual length to 16MiB). > > Can we just make it return 0 vs errno? The only time we return > a different length than the one passed in is due to the btrfs cap. > > Given that this API started out on btrfs we should just do the cap > everywhere to not confuse userspace. And that's a completely arbitrary cap; sure btrfs started out with that, but there's no fundamental reason for that becoming the global limit. Xfs now added a different, larger limit, so based on what reason should that limit be reduced? I don't care either way, but at this stage I'm not going to change this patch, unless there's a very good reason to do so, because if I do someone will come and suggest another improvement, ad-infinitum... Thanks, Miklos