From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A6C5C43381 for ; Fri, 22 Mar 2019 11:03:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 587B02190A for ; Fri, 22 Mar 2019 11:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553252605; bh=EXO55wllw5mWU+yZYjES5fnzIafBDN+jsfejys+Tt5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Fj2fz/q0z3KXXHd4jB7wWqn1aecBb25qMI/La4gKVlZH+q/4H2FajqySv3ZNXZ+Aw Aj4B9LVSiNA+LjuwM7SEmLiHo1eUj50czU8hhpf0SlAfPgiVqgieKqwnIQFtaaTHNO 9k6o2tc1byn3FeTlghucGEP5+LRW8KcsNdhbBaXU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727762AbfCVLDY (ORCPT ); Fri, 22 Mar 2019 07:03:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:38792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727713AbfCVLDY (ORCPT ); Fri, 22 Mar 2019 07:03:24 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 56C6E21900; Fri, 22 Mar 2019 11:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553252603; bh=EXO55wllw5mWU+yZYjES5fnzIafBDN+jsfejys+Tt5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nZzJ8GB9Ni80yyGvT3N+jDj5fBbCJCsN3XlaGWjkWyQ497Mwavh1Rir79jelZt2Ho z9pV0yNtmaHUiWKoe0KQuU4sY2Zn+06lQx1AQsLiyjLyF4nBBHpeI9GUeNoLJoPCYc KGs3SFcYjVdBdV6ZYNuc8WpU1+V4BQ2nThymMVS8= Date: Fri, 22 Mar 2019 12:03:20 +0100 From: Greg KH To: Coly Li Cc: stable@vger.kernel.org, Dave Chinner , Christoph Hellwig , Jens Axboe Subject: Re: [PATCH] bcache: use (REQ_META|REQ_PRIO) to indicate bio for metadata Message-ID: <20190322110320.GA26607@kroah.com> References: <20190322074844.17341-1-colyli@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190322074844.17341-1-colyli@suse.de> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Mar 22, 2019 at 03:48:44PM +0800, Coly Li wrote: > In 'commit 752f66a75aba ("bcache: use REQ_PRIO to indicate bio for > metadata")' REQ_META is replaced by REQ_PRIO to indicate metadata bio. > This assumption is not always correct, e.g. XFS uses REQ_META to mark > metadata bio other than REQ_PRIO. This is why Nix noticed that bcache > does not cache metadata for XFS after the above commit. > > Thanks to Dave Chinner, he explains the difference between REQ_META and > REQ_PRIO from view of file system developer. Here I quote part of his > explanation from mailing list, > REQ_META is used for metadata. REQ_PRIO is used to communicate to > the lower layers that the submitter considers this IO to be more > important that non REQ_PRIO IO and so dispatch should be expedited. > > IOWs, if the filesystem considers metadata IO to be more important > that user data IO, then it will use REQ_PRIO | REQ_META rather than > just REQ_META. > > Then it seems bios with REQ_META or REQ_PRIO should both be cached for > performance optimation, because they are all probably low I/O latency > demand by upper layer (e.g. file system). > > So in this patch, when we want to decide whether to bypass the cache, > REQ_META and REQ_PRIO are both checked. Then both metadata and > high priority I/O requests will be handled properly. > > (Coly Li: backport the original patch for Linux-stable v4.19) Now queued up, thanks. greg k-h