From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark B Subject: dirty buffer_head, but not marked dirty Date: Sun, 26 Oct 2003 19:37:22 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <200310261937.22342.mark@lemna.hr> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from as102.hinet.hr ([195.29.150.42]:59917 "EHLO as102.htnet.hr") by vger.kernel.org with ESMTP id S263389AbTJZSbm (ORCPT ); Sun, 26 Oct 2003 13:31:42 -0500 Received: from ss402.hinet.hr (ss402.hinet.hr [195.29.150.2]) by as102.htnet.hr (0.0.0/8.12.10) with ESMTP id h9QIX452074030 for ; Sun, 26 Oct 2003 19:33:04 +0100 (CET) Received: from trinity.lemna.hr (207-77.adsl.net.hinet.hr [194.152.207.77]) by ss402.hinet.hr (0.0.0/8.12.10) with ESMTP id h9QIVeie011871 for ; Sun, 26 Oct 2003 19:31:40 +0100 (MET) Received: from merneith.lemna.hr (infinity.lemna.hr [10.10.15.21]) by trinity.lemna.hr (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id h9QIZ8Ob004232 for ; Sun, 26 Oct 2003 19:35:08 +0100 To: linux-fsdevel In-Reply-To: Content-Disposition: inline List-Id: linux-fsdevel.vger.kernel.org Hi! One quick question. Someone takes a buffer_head via sb_bread(), modifies the data in it (b_data), and then decides that the modifications are not ok, so we want the old one back... Is there a function to mark the data trashed or should we simply release it with brelse()? I think brelse() is not good to do (someone else (or we) may get the trashed data with the next call from sb_bread() ) Would something like reiserfs_unmap_buffer() do the job correctly(would it force to reread the buffer)? (I know I could easily keep a copy of it or reverse the changes, but the changes are through more blocks, so it would be much harder to restore the situation by calling some trash() function on them) -- Mark Burazin mark@lemna.hr ---<>---<>---<>---<>---<>---<>---<>---<>---<> Lemna d.o.o. http://www.lemna.biz - info@lemna.hr <>---<>---<>---<>---<>---<>---<>---<>---<>---