Why when I copy a file, there was no metadata come with the user data in last two transactions...?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I want to ask a question.

First, I describe the scenario I encountered.

I generated a 1G txt file, and the file content is "1234567" repeat.

And I used "cp" instruction to copy this file to the destination empty
folder. (in linux2.6.17, ext3 with ordered mode)


I observed that every commit transactions before "prompt", there would
have metadata (i.e., journal_head on t_buffer_list) with user data(i.e.,
journal_head on t_sync_datalist) in each transaction.

After the "prompt", there would be about 3 transaction left to finish the
"copy" instruction, we can call that T1, T2 and T3.


When T1  occurred, there would still has metadata with the user data in
this transaction.

But the problem is that, after transaction T1, T2&T3 only has the userdata
(i.e., only has journal_head on t_sync_datalist), there were no any
metadata there !!!!


As I known before, the user data was flushed from the page cache into a
transaction and then flush to the disk. And it has to have some metadata
with it (ex: block allocation info, etc.)

But why the last 2 transactions always has no metadata..... (every time,
no exception!)


1. I've try to print the user data in the last two transaction, and the
result is that the data is what I copied.

2. Another observation is that, in the last two transactions, the number
of handles is always equal to the number of journal_head on
t_sync_datalist.


The above is the question I want to ask.  Thank you so much!!!!

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux