Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2398923lqo; Mon, 13 May 2024 18:26:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKip+i9NQ1XE+reQWg/ZIBC9u9SGXh0Z0GytJk4OPg1VEb1p7B/heRJs5i56PClDZV0ol5SiDb4EHmaKyQQfU1Z9rCAtFJDNt2rx5bPg== X-Google-Smtp-Source: AGHT+IH65YiflHI65JIub7UCVAZzO9HqiJpMmGMegQ6Y46jWkSRZAJmQUQEfzXPUKnqxq/eXXbcM X-Received: by 2002:a05:6512:ac9:b0:518:9c8e:f172 with SMTP id 2adb3069b0e04-5220fb6aee2mr8694286e87.18.1715649999647; Mon, 13 May 2024 18:26:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715649999; cv=pass; d=google.com; s=arc-20160816; b=qiCxiefhuUW/nTTVK7SAq7Gkjc59SFPj+/KvAi8eYu7f25ckPNrk8PjMmP1xjCPEy1 aIs4a/G3Oj3AG62qKXV9zvEYtBkmoZ8n1AsbPscEBetjKWCpRhJwEvbRH1T/fCiQolzK d8+r/WIreD1xGvdLr9Jy+HUkRxuMVgtZSEyFJRATLYBZACCQtMb3FkjTMmhkX6JrBOIq GwAY3WWmfXRWo+BSr5I9mladcaQiq5aiXJ8T+T4+2oewkq+BGO3F2Bn3wXXhr2/LHloQ FGodGOl+LKwg4nPNByKE7if1Qa9IQQKyw7NfC7NISjSqtZ/Po01rN8APCl2BGtcv4pQu R4Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=D4ZvohIwpoATIf1kOoEHa9IE5VgAEOMsVFO6GEWhlfM=; fh=mK/maD/OE0T156fHPNWT60C+yUeRwbsxJm1LGIht3qo=; b=y7N4900h1KrG/HR79+PLHQe62eI8mFdf95Ef69DlC48L6xjeUbjK8E/pyfMOlY/+Ey nghD7wQonBqgcJ7QZ+HLafXJmfTPRY/i83gv/iJX0xSINVZNUltcHNIB+d+o3A/j+dBN /cGXukxbCQ03HiLeyFKQg/LhaGGQQmWNFPxt2ECPjLXt/a4u+olQSk37EM+tDXoI0Gn4 7xgu+i6X11BdYMEnZqevbo/549soxFKQ03sbquRyHYvx24WLbcNwRoSG3UkBgBcR+QHN 5BfOKhMFdJgUUp8Z9lc9LwGpVLKDKqSzAzDKhtJsVC+T4KafySdttrzIQuimVB0KbdbO C8fQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=NP8lJqA0; arc=pass (i=1 spf=pass spfdomain=canb.auug.org.au dkim=pass dkdomain=canb.auug.org.au dmarc=pass fromdomain=canb.auug.org.au); spf=pass (google.com: domain of linux-kernel+bounces-178236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21e9esi581638066b.359.2024.05.13.18.26.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 18:26:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=NP8lJqA0; arc=pass (i=1 spf=pass spfdomain=canb.auug.org.au dkim=pass dkdomain=canb.auug.org.au dmarc=pass fromdomain=canb.auug.org.au); spf=pass (google.com: domain of linux-kernel+bounces-178236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3A2F11F23322 for ; Tue, 14 May 2024 01:26:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE4FE1C36; Tue, 14 May 2024 01:26:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="NP8lJqA0" Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 578F6EDC; Tue, 14 May 2024 01:26:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715649990; cv=none; b=MrWMffpWPjPzsAu9RzK1IDFT7wPuZm0ZtYoj7G9D1oYqeVn6BN4ldSGoIFkc4q7aK5GdN7kQ0cDz+Vna4bi9IIUEjWetEISLIOSsFZDc5Gq2zawIuG0jxUMjvlRp1Lw97xBSPamyOOr3gOQw6fqSJHF7OU3ZCzJ/lHqYkC919fc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715649990; c=relaxed/simple; bh=ZTBmPRZplR8W18GGJCNCbMS9FmtIuBAuXx20MKNwRrg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=RdKjgaErNGzAQCODj4AMeVczl4++uc+dCNKGVFzTVcbJw1BSxBNOrTEbxFKT+nbXQvVneF/ZkMBqVfyRlf+uwUQTXGFQ8MVcZE11NkgbYk4QRNf47DNqb6jFgtHV5DnkxphULCtutotPwwK3dH7wyMEaSf93125AoOCfg54DLu4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au; spf=pass smtp.mailfrom=canb.auug.org.au; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b=NP8lJqA0; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1715649984; bh=D4ZvohIwpoATIf1kOoEHa9IE5VgAEOMsVFO6GEWhlfM=; h=Date:From:To:Cc:Subject:From; b=NP8lJqA0mOsf8hQ/zF0mc9vEFkF9nCNpKMKa1xdEqYtu3gqwn1V86oW/aWXJsk6EM BICEAxQoBlXBQUkbiMDLImw2Al6Fsd1mhyJKVZF2Wso6pF/n5SRys6njejIxPB6xHI AaCatBM3DsvWwWCVzmpXLseZxSYgEFFJiKFrBroAE8qWgbbWUc4kZs+7MtNFjC6fG2 bvR1HHF0sQj6M/QuBZDWyHdwAUbywGcMWZt7KIT/WFaOeIKCdmtwfq9JxV/mceCVxN rffa4J8i4BdMoFMvPu1RzEMiH2TDeLEv4st9cMijEg8tFoWSUhNZ20qElp9WbtvENC waqvrFw13RLLA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Vddwv4Shkz4wb0; Tue, 14 May 2024 11:26:23 +1000 (AEST) Date: Tue, 14 May 2024 11:26:22 +1000 From: Stephen Rothwell To: Al Viro Cc: Christian Brauner , Christoph Hellwig , Jens Axboe , Linux Kernel Mailing List , Linux Next Mailing List Subject: linux-next: manual merge of the vfs tree with Linus' tree Message-ID: <20240514112622.63021dce@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_//SomYFN01wtONHPhVXDx5rV"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_//SomYFN01wtONHPhVXDx5rV Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the vfs tree got a conflict in: block/ioctl.c between commits: 30f1e7241422 ("block: move discard checks into the ioctl handler") 719c15a75ebf ("blk-lib: check for kill signal in ioctl BLKDISCARD") 0c9f4ac808b0 ("Merge tag 'for-6.10/block-20240511' of git://git.kernel.dk= /linux") from Linus' tree and commit: 695eaf683e8e ("blk_ioctl_{discard,zeroout}(): we only want ->bd_inode->i_= mapping here...") from the vfs tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc block/ioctl.c index c7db3bd2d653,0513fbe90280..000000000000 --- a/block/ioctl.c +++ b/block/ioctl.c @@@ -95,12 -95,8 +95,11 @@@ static int compat_blkpg_ioctl(struct bl static int blk_ioctl_discard(struct block_device *bdev, blk_mode_t mode, unsigned long arg) { - uint64_t range[2]; - uint64_t start, len, end; + unsigned int bs_mask =3D bdev_logical_block_size(bdev) - 1; - struct inode *inode =3D bdev->bd_inode; + uint64_t range[2], start, len, end; + struct bio *prev =3D NULL, *bio; + sector_t sector, nr_sects; + struct blk_plug plug; int err; =20 if (!(mode & BLK_OPEN_WRITE)) @@@ -130,34 -124,9 +129,34 @@@ err =3D truncate_bdev_range(bdev, mode, start, start + len - 1); if (err) goto fail; - err =3D blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL); + + sector =3D start >> SECTOR_SHIFT; + nr_sects =3D len >> SECTOR_SHIFT; + + blk_start_plug(&plug); + while (1) { + if (fatal_signal_pending(current)) { + if (prev) + bio_await_chain(prev); + err =3D -EINTR; + goto out_unplug; + } + bio =3D blk_alloc_discard_bio(bdev, §or, &nr_sects, + GFP_KERNEL); + if (!bio) + break; + prev =3D bio_chain_and_submit(prev, bio); + } + if (prev) { + err =3D submit_bio_wait(prev); + if (err =3D=3D -EOPNOTSUPP) + err =3D 0; + bio_put(prev); + } +out_unplug: + blk_finish_plug(&plug); fail: - filemap_invalidate_unlock(inode->i_mapping); + filemap_invalidate_unlock(bdev->bd_mapping); return err; } =20 --Sig_//SomYFN01wtONHPhVXDx5rV Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmZCvb4ACgkQAVBC80lX 0Gx0xAf/ZdxY+yVGz90SjSSJdIHPqCwcqsdkW9lTDCj/ype7aXjsrZomSZEm14yd w55rNd7ZRdee7ZUsCOSzX5wodX/OPxDdsDHH9DsOAFj0D35lIsYp1fMXOtGiDGbL yv2p/GtWP4woPvWeVc+KehSTdj5I6mYlhSUrel5JG5a+D+Y9IzusqP26j+FFoozT aDNRSJppDwoxzPJq/FftTCyTTRYfjEe3vcdQWpV4qvBDNgXMOc3pKDwxgCWvfx3f qwBtSqE5V955AHrn3TElS2P8V/T7R9TzTKl4e7rdjHzQJGZWurYIgA1kTIyduezd M8mA3QBVHK6DOUSHLGBdDHnb7merVQ== =p/7N -----END PGP SIGNATURE----- --Sig_//SomYFN01wtONHPhVXDx5rV--