From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C613E341AB8 for ; Thu, 19 Feb 2026 15:24:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771514684; cv=none; b=slAJ+alOhT//5xs3JSsUA60o7DGEKx5KMMJaOGpGLIyLr93kLQp0WAG4c2IEwVehA6xliT6ZQKdpwYS0kRd2zdsflKtok9SbEfGbXwgw47nQVvGtkDIxo0Kik90hW+YlSsQI0/1gq7xOTFiA4Q/64IPnddMX9ir1ED6AQUYRZ6c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771514684; c=relaxed/simple; bh=lDifLTAx9n9Mk40OXQsRSz1vGqgpmvsXnNPyhYBsb2A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GoaTNuQVcpSJulCovDWaDGEYiRHiQOxSztyMi1EvClp1hjtJ8Pg2z3VwPTPLZycH6/hUphsqrJnVx13rfBHpTFts0L5EjnSyb8yk/k6Zn6z0etqUc13MO8f+7SrsWdy5w5bu7reP8i1nAd5UsaG2ufxqPuufzMWTj4vUyd+IP40= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=rP+SJ6It; arc=none smtp.client-ip=209.85.160.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="rP+SJ6It" Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-40fb2789476so1894431fac.1 for ; Thu, 19 Feb 2026 07:24:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1771514682; x=1772119482; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JgHRaYW1iBhNDu18vHtaVid1O4fLAXLvbx6+OcL28Ko=; b=rP+SJ6ItQ9+0oGu8v1SHmgBL4tJPjuYcoaOv5KD+xlf3WnkdeLuTqOJ/ER1KI9Hiv0 b5xbALEcDaZcaBaQl5lWsqZsKUTKvmDsssgoTAXxkyIYNsw4sFvAbuBrS108+yvOQUad ufv/VdRFxhOXTA9fnFMG2aptWNcOMGbFNFIKVtsPuPQ8wAqe5HQVw8bQ9r404Qq2//5q CnMJJxql8Zlz2BogV1j1RO3VQ2pIpu4LnAU0OSv76EEtD4Vs/T1m6Dm6nfO+nlDqxVxS k8QG3Qewz8+CgiotrlTtKA6BbBgBX915w4QJ/xpfzZmQstCXb4Nb+gITYVJu8cL+q94r I9dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771514682; x=1772119482; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JgHRaYW1iBhNDu18vHtaVid1O4fLAXLvbx6+OcL28Ko=; b=gs3G0Fl+iQs7iFZz8faLQbbO2Do2Yz+rpUSHUg4xBswgVWGPNrQx9yMlK/eoLHRxbG Cd0ZKpVZEPxIqEV0TbIslGCUmDmUT2Amrs2pmIM6tkjOvFig3Po3mxTfDDFt7tfvCe5/ ghviptwUSGh2gO0JZ37eqkaCX9qkvvhAaV941Pzwdq3dlSYy7305ysoVWnkenO/udUz/ GYruWOU9eAJTOmHuiUW8dJkkMVCCNFnywIWY5Nmkh+woLtg190O0sMzn7jwBSLKD7NcO eZNTKvvsGFdXsabiVz9YlvYZoKuc2bbfktLdzEAC9InmyFnzbbiwv6h6sQuAnvtPsx2g zraw== X-Forwarded-Encrypted: i=1; AJvYcCXlYJXYs6ZW6a2xIKQ7kw5zodr/EjvhihPwKs651fDAlHchL3ovsqkM+UTLCpcNhlNdkRJCZMhplB4wzXI=@vger.kernel.org X-Gm-Message-State: AOJu0YykOeJDRXDZWz2wTuDY3HEQIp3nyLBDQNTnQn48d+XHo0BrZq8J 8OrjJJuX0VXsRj97lYV71pz4iiBoDxGnW16xSTF61wXSPHl3Gc8nyTLc/vd4K1u+Y9w= X-Gm-Gg: AZuq6aK56eWgWvpuVST9zwmESiGRngM1q31Y9Hnzp4d3oHAUJCtGAGALrpm8b16RiVm Xa8vRbhmtonpr/wVX4yHc9rN4BH74lBNIKVNNiBT0P/IGvNwsm6S8sIG+JwTQJqQWCTlfJIQVAm +cmiM9wakkcxLcGhc/7FT4yyY+Av8mNKI92A22AJvtpyOljqZn7kKzpixwuesUYpon5BZv6QM44 pr+KF0LFyxuvclWjSlbH9zaOvoMwUIf5vNyhaHEko6WmcguT1ddepg1XgfXvUW8rJPj69JthhRR CiX5B86Ej2njXdgACe5oasb+EZb/INzTloOh+4KRUSw04FUDImpX3po6iiIK5uCTvxV+9E6J6RF dJVBQdxCQ2vKWQjFP5o5Mg/h8cTs88rc/Q2QFk73WW/nFYCSsevL+hIeosJJsakwxKOSfbEA2yU 089qi6nC2PApLocdU/P7RRND3T3nkSBjD2zckPfJK/+RKllHv5CN4N/OvH1EaJppdQdsN+lj3H1 SP3pwRYtOA= X-Received: by 2002:a05:6870:a0ad:b0:414:9285:c243 with SMTP id 586e51a60fabf-41545713115mr1093784fac.21.1771514681487; Thu, 19 Feb 2026 07:24:41 -0800 (PST) Received: from [172.25.209.35] ([187.199.77.89]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-40f062ee328sm17955312fac.4.2026.02.19.07.24.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Feb 2026 07:24:40 -0800 (PST) Message-ID: <35866783-2312-4e31-904d-3746510eaf56@kernel.dk> Date: Thu, 19 Feb 2026 08:24:38 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC] block: enable RWF_DONTCACHE for block devices To: Tal Zussman , "Tigran A. Aivazian" , Alexander Viro , Christian Brauner , Jan Kara , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Dave Kleikamp , Ryusuke Konishi , Viacheslav Dubeyko , Konstantin Komarov , Bob Copeland Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, linux-karma-devel@lists.sourceforge.net References: <20260218-blk-dontcache-v1-1-fad6675ef71f@columbia.edu> Content-Language: en-US From: Jens Axboe In-Reply-To: <20260218-blk-dontcache-v1-1-fad6675ef71f@columbia.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/18/26 2:13 PM, Tal Zussman wrote: > Block device buffered reads and writes already pass through > filemap_read() and iomap_file_buffered_write() respectively, both of > which handle IOCB_DONTCACHE. Enable RWF_DONTCACHE for block device files > by setting FOP_DONTCACHE in def_blk_fops. > > For CONFIG_BUFFER_HEAD paths, thread the kiocb through > block_write_begin() so that buffer_head-based I/O can use DONTCACHE > behavior as well. Callers without a kiocb context (e.g. nilfs2 recovery) > pass NULL, which preserves the existing behavior. > > This support is useful for databases that operate on raw block devices, > among other userspace applications. OOO right now so I'll take a real look when I'm back, but when I originally did this work, it's not the issue side that's the issue. It's the pruning done from completion context, and you need to ensure that's sane context for that (non-irq). -- Jens Axboe