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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C5E9C77B75 for ; Tue, 9 May 2023 16:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683651111; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/6jUBAFI86OeK6EB2c0wD74TFCXI7kQBSyHQ3thsPw0=; b=LNJ1xtp1BoHB6j/KyKC3YiIsg7VZB/BjgQEfHyEbZZnpNvJ3R2wGjAt8gGoERN8W8MAHq+ oYmxwaIoxsmAQsoI5hfLVfck55qB/BKQ56p2iFjwZj3nCM7GCTgbm/7kcJbwFBlvjnxT0R p/aPJ/j1m6PHh3V+cLMOwzS/YZfY4Ro= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-187-xiAi4rcBPq-9WPW2z72jjQ-1; Tue, 09 May 2023 12:51:48 -0400 X-MC-Unique: xiAi4rcBPq-9WPW2z72jjQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5BC888026E8; Tue, 9 May 2023 16:51:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A54863F5B; Tue, 9 May 2023 16:51:44 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7B18D19465BD; Tue, 9 May 2023 16:51:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3A83E19465BC for ; Tue, 9 May 2023 16:51:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1A193492B00; Tue, 9 May 2023 16:51:43 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12A8D492B01 for ; Tue, 9 May 2023 16:51:43 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EB7AC100F64F for ; Tue, 9 May 2023 16:51:42 +0000 (UTC) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-48-sW9cOq2-MuCLxjyfYSyVgg-1; Tue, 09 May 2023 12:51:41 -0400 X-MC-Unique: sW9cOq2-MuCLxjyfYSyVgg-1 Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-7577ef2fa31so782368185a.0 for ; Tue, 09 May 2023 09:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683651100; x=1686243100; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8AiXugarlhHToBN2ueOGwWaX5E4llz8s13EASoB3wVI=; b=UgOswdxZxN5GrLRyMP3SjR8dn6CzCptACbbACt9oJTnlKBAgqMzseDBJ5/7Utw94dG rZ6p/1oyqL0/7q4+S5MPGfSKyeww2r7R0V7S/dl+6deoZbPegaG2NDDgxTmjtGhDhzz/ nlx06vqOjTnDRIXMoB0A/qZqE0wsG8uiW8jWTJBMKK2nGl2GwEvxyYpwpqrvu+b5rK+9 +Z+NYoq/LwjPdeyoP5F/rKnoAbqZ/1LGQYqT3usNOBX/UI3DsqnOPmiKmZZlQleXBG3a rS//D6PXBm0wlSL4uXwViEY6zCJ04HtBxmslH1sYQn1TWZo4ymohtficwoJOFip92+xx Agrw== X-Gm-Message-State: AC+VfDwaYGqsS+NW5OilaNkYD/Y2h7JTsF2/hOP2SZsBKZfRJCtKRDQq mTYLi68sm1Wba/eg8kb57wcdNLarv3+WQSyY215Ffvc= X-Google-Smtp-Source: ACHHUZ4xRyujKImbkSQcW8Z759B/taKjk2/BBWT+4ePbKXa9irKnpFPNPIQc/SyDOhMLc66FmfxRwA== X-Received: by 2002:a05:6214:29c7:b0:56e:c066:3cd2 with SMTP id gh7-20020a05621429c700b0056ec0663cd2mr19939922qvb.2.1683651100740; Tue, 09 May 2023 09:51:40 -0700 (PDT) Received: from localhost ([217.138.208.150]) by smtp.gmail.com with ESMTPSA id m4-20020a0cf184000000b0061b3338d6d9sm890247qvl.50.2023.05.09.09.51.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 09:51:40 -0700 (PDT) Date: Tue, 9 May 2023 12:51:38 -0400 From: Mike Snitzer To: Sarthak Kukreti Message-ID: References: <20230420004850.297045-1-sarthakkukreti@chromium.org> <20230506062909.74601-1-sarthakkukreti@chromium.org> <20230506062909.74601-2-sarthakkukreti@chromium.org> MIME-Version: 1.0 In-Reply-To: <20230506062909.74601-2-sarthakkukreti@chromium.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Subject: Re: [dm-devel] [PATCH v6 1/5] block: Don't invalidate pagecache for invalid falloc modes X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , Christoph Hellwig , Theodore Ts'o , "Michael S. Tsirkin" , "Darrick J. Wong" , Jason Wang , Bart Van Assche , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@redhat.com, Andreas Dilger , Stefan Hajnoczi , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Brian Foster , Alasdair Kergon Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, May 06 2023 at 2:29P -0400, Sarthak Kukreti wrote: > Only call truncate_bdev_range() if the fallocate mode is > supported. This fixes a bug where data in the pagecache > could be invalidated if the fallocate() was called on the > block device with an invalid mode. > > Fixes: 25f4c41415e5 ("block: implement (some of) fallocate for block devices") > Cc: stable@vger.kernel.org > Reported-by: Darrick J. Wong > Signed-off-by: Sarthak Kukreti Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD1CBC77B75 for ; Tue, 9 May 2023 16:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234462AbjEIQw2 (ORCPT ); Tue, 9 May 2023 12:52:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjEIQw0 (ORCPT ); Tue, 9 May 2023 12:52:26 -0400 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 950BF1725 for ; Tue, 9 May 2023 09:51:41 -0700 (PDT) Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-75131c2997bso2273266585a.1 for ; Tue, 09 May 2023 09:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683651100; x=1686243100; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8AiXugarlhHToBN2ueOGwWaX5E4llz8s13EASoB3wVI=; b=ir5QBrBONTy0NjzUTqCmfrAcytMOdgjaTXLdyhgHK3VIweBv3OacvqKaUlRDwz1BEW u2ddi/SktOFYpxWi0xUyu3sgFnbE6F98nCbRFYvXeYwI0bKdvjcH81224Bw6GKd6SsnI LamqINOyP5O4g4fbMfczc6ZQFOAbStf6dZMKqsxfaB0wxVaeFrs4FeD0QyzcfeRMRbvD c2elRYs9Evf2djHyWSxdEyaNW+04EcmNwKJ8ai/6tQuOYhm7Up6X3z0S4WSw2x3Lxwe5 ZVH7ncCZBEi7snnykrW5ZxMFy57gAL1pkXedq5Kcpi3vrtSb0W4c6XPvzsk+HRBX0WJS lx6g== X-Gm-Message-State: AC+VfDw6MNeDOKqgL/Vh4pPF3hwVWZS1JNb+QaMclwMKTfI2VWQtTixC pHfeHLoXfr9ggoUMGNH5WaW2 X-Google-Smtp-Source: ACHHUZ4xRyujKImbkSQcW8Z759B/taKjk2/BBWT+4ePbKXa9irKnpFPNPIQc/SyDOhMLc66FmfxRwA== X-Received: by 2002:a05:6214:29c7:b0:56e:c066:3cd2 with SMTP id gh7-20020a05621429c700b0056ec0663cd2mr19939922qvb.2.1683651100740; Tue, 09 May 2023 09:51:40 -0700 (PDT) Received: from localhost ([217.138.208.150]) by smtp.gmail.com with ESMTPSA id m4-20020a0cf184000000b0061b3338d6d9sm890247qvl.50.2023.05.09.09.51.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 09:51:40 -0700 (PDT) Date: Tue, 9 May 2023 12:51:38 -0400 From: Mike Snitzer To: Sarthak Kukreti Cc: dm-devel@redhat.com, linux-block@vger.kernel.org, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , Theodore Ts'o , "Michael S. Tsirkin" , "Darrick J. Wong" , Jason Wang , Bart Van Assche , stable@vger.kernel.org, Christoph Hellwig , Andreas Dilger , Stefan Hajnoczi , Brian Foster , Alasdair Kergon Subject: Re: [PATCH v6 1/5] block: Don't invalidate pagecache for invalid falloc modes Message-ID: References: <20230420004850.297045-1-sarthakkukreti@chromium.org> <20230506062909.74601-1-sarthakkukreti@chromium.org> <20230506062909.74601-2-sarthakkukreti@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230506062909.74601-2-sarthakkukreti@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Sat, May 06 2023 at 2:29P -0400, Sarthak Kukreti wrote: > Only call truncate_bdev_range() if the fallocate mode is > supported. This fixes a bug where data in the pagecache > could be invalidated if the fallocate() was called on the > block device with an invalid mode. > > Fixes: 25f4c41415e5 ("block: implement (some of) fallocate for block devices") > Cc: stable@vger.kernel.org > Reported-by: Darrick J. Wong > Signed-off-by: Sarthak Kukreti Reviewed-by: Mike Snitzer