Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 14 Feb 2001 07:02:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 14 Feb 2001 07:02:25 -0500 Received: from perninha.conectiva.com.br ([200.250.58.156]:25614 "EHLO perninha.conectiva.com.br") by vger.kernel.org with ESMTP id ; Wed, 14 Feb 2001 07:02:19 -0500 Date: Wed, 14 Feb 2001 08:12:47 -0200 (BRST) From: Marcelo Tosatti To: NIIBE Yutaka cc: Alan Cox , Russell King , Linus Torvalds , lkml Subject: Re: [PATCH] swapin flush cache bug In-Reply-To: <200102140208.LAA18226@mule.m17n.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Feb 2001, NIIBE Yutaka wrote: > Alan Cox wrote: > > Ok we need to handle that case a bit more intelligently so those flushes dont > > get into other ports code paths. > > Possibly at fs/buffer.c:end_buffer_io_async? > > We need to flush the cache when I/O was READ or READA. Yet another thing (1) on end_buffer_io_async() to handle a case which is only true for a specific user of it. Since the other special case handling is for swap IO too, I think a separate IO end operation for swap would be interesting. (1) The current one is SetPageDecrAfter handling. > Is there any way for end_buffer_io_async to distinguish which I/O (READ or WRITE) > has been done? Yes. If the buffer_head is uptodated (BH_Uptodate) then its a WRITE, otherwise its a READ (this is only true before mark_buffer_uptodate() call inside end_buffer_io_async(), of course). - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/