From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 804BCD2E1; Thu, 21 Dec 2023 06:12:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="RnIB+hTC" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fD9rBv6cYFApB69+XHlAtZrlbGuncMHSqv5l94QWf6g=; b=RnIB+hTCfFYivJfjgzh/O6mGDm zIpmTF7TjXT23xGu+qzqiLCWOR5xhMdaHm7Hds4vTZ2popQRp6FWtu720gVUfgI+r3/gfwXDn9Rny GEWfoWuJVzK1sMcYbgNTFXgi2ymamUeVJjB8l3f8bnrjfPa+t523+D/+DsWDwZdS1K1YnFZBMQ53w QeWpOM6hc+pxYbpP5kWS27+VoJpz0CUYu/hI47Rp8A7F4KKAkXzHWgpnBVbq3TN+3DOw6WI1/h3ML 9sPHefdfV327ViMp9AbAOzSdEx9D4F77Wte8RlJPzwQNhnQUoSp3tYqpnmae+YuJnBaYA4o6UHFEa +PSNPREw==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1rGCIb-001nwk-15; Thu, 21 Dec 2023 06:12:49 +0000 Date: Wed, 20 Dec 2023 22:12:49 -0800 From: Christoph Hellwig To: Song Liu Cc: linux-block@vger.kernel.org, linux-raid@vger.kernel.org, axboe@kernel.dk, kent.overstreet@linux.dev, janpieter.sollie@edpnet.be, colyli@suse.de, bagasdotme@gmail.com Subject: Re: [PATCH 1/2] block: Check REQ_OP_FLUSH in op_is_flush() Message-ID: References: <20231221012715.3048221-1-song@kernel.org> <20231221012715.3048221-2-song@kernel.org> Precedence: bulk X-Mailing-List: linux-raid@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231221012715.3048221-2-song@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, Dec 20, 2023 at 05:27:14PM -0800, Song Liu wrote: > Upper layer (fs, etc.) may issue flush with something like: > > bio_reset(bio, bdev, REQ_OP_FLUSH); > bio->bi_end_io = xxx; > submit_bio(bio); No, they can't. REQ_OP_FLUSH is currently only used by request based drivers and only generated by the flush state machine. (Not that I particularly like this wart, I'd much prefer file systems to submit a REQ_OP_FLUSH than an empty write with a preflush flag, but that's not a trivial change).