From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Sandeen Subject: clear uptodate in 2.6's discard_buffer()? Date: Mon, 12 Sep 2005 09:38:49 -0500 Message-ID: <432592F9.2020806@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from omx3-ext.sgi.com ([192.48.171.20]:29665 "EHLO omx3.sgi.com") by vger.kernel.org with ESMTP id S1751108AbVILOiv (ORCPT ); Mon, 12 Sep 2005 10:38:51 -0400 Received: from internal-mail-relay1.corp.sgi.com (internal-mail-relay1.corp.sgi.com [198.149.32.52]) by omx3.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id j8CFOhOf020539 for ; Mon, 12 Sep 2005 08:24:43 -0700 Received: from spindle.corp.sgi.com (spindle.corp.sgi.com [198.29.75.13]) by internal-mail-relay1.corp.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id j8CEfQAQ54257551 for ; Mon, 12 Sep 2005 07:41:26 -0700 (PDT) Received: from [127.0.0.1] (sshgate.corp.sgi.com [198.149.36.12]) by spindle.corp.sgi.com (SGI-8.12.5/8.12.9/generic_config-1.2) with ESMTP id j8CEcosS88951308 for ; Mon, 12 Sep 2005 07:38:50 -0700 (PDT) To: linux-fsdevel Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org I was tracking down a problem in xfs, which led me to discover that discard_buffer(), in my case called when truncating a file, does not clear the Uptodate flag on the bh. It looks like clearing Uptodate was removed fairly specifically in the 2.6 tree, long ago, as part of a much larger changeset: http://linux.bkbits.net:8080/linux-2.6/cset@1.373.70.7?nav=index.html|src/|src/fs|related/fs/buffer.c At first glance it seems odd to me that we would clear dirty, mapped, req, new, and delay flags, and also NULL out the b_bdev, but leave buffers marked as uptodate. Is there a reason to leave the uptodate flag, or is this an oversight? Thanks, -Eric