linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Read in ext3
@ 2003-08-22  0:09 vijayan prabhakaran
  2003-08-22  0:40 ` Mike Fedyk
  0 siblings, 1 reply; 2+ messages in thread
From: vijayan prabhakaran @ 2003-08-22  0:09 UTC (permalink / raw)
  To: linux-kernel


Hi,

I have a doubt on how ext3 handles read in this specific case.

Assume that a page is written to the journal but not yet updated
to its actual location and before updating the actual copy the 
page
gets invalidated. Now if a read comes to the same
data, which block will be read: the journal copy or the actual
copy ?

First of all, will this situation ever occur ? The page will be
marked dirty until it is written to its actual location so it 
may
never get invalidated until it is written to the actual
location!

I appreciate your help.

Since I'm not subscribed to this list, could you please CC your 
answers to my personal mailid.

Thanks.
Vijayan



___________________________________________________
Meet your old school or college friends from
1 Million + database...
Click here to reunite www.batchmates.com/rediff.asp



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Read in ext3
  2003-08-22  0:09 Read in ext3 vijayan prabhakaran
@ 2003-08-22  0:40 ` Mike Fedyk
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Fedyk @ 2003-08-22  0:40 UTC (permalink / raw)
  To: vijayan prabhakaran; +Cc: linux-kernel

On Fri, Aug 22, 2003 at 12:09:26AM -0000, vijayan prabhakaran wrote:
> 
> Hi,
> 
> I have a doubt on how ext3 handles read in this specific case.
> 
> Assume that a page is written to the journal but not yet updated
> to its actual location and before updating the actual copy the 
> page
> gets invalidated. Now if a read comes to the same
> data, which block will be read: the journal copy or the actual
> copy ?
> 
> First of all, will this situation ever occur ? The page will be
> marked dirty until it is written to its actual location so it 
> may
> never get invalidated until it is written to the actual
> location!

The page will be in memory until the transaction has finished.  The
transaction won't finish until it has been moved from the journal to its
final location on disk.

Once that has happened the page can be freed.  Now, if the page is
invalidated in the middle of the transaction, all future accesses will come
from memory until that page is flushed, or cleaned.

IIUC, ext3 never reads from the journal (unless you're doing a recovery).
The journal just shows on disk what is already in memory so it can be
recovered after an abnormal shutdown.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-22  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-22  0:09 Read in ext3 vijayan prabhakaran
2003-08-22  0:40 ` Mike Fedyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).