From: Sucan Zhang Subject: why sector number not match block number? Date: Tue, 9 Jun 2009 16:37:47 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1915691937==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1915691937== Content-Type: multipart/alternative; boundary=001636e1fbd133ebc7046be64717 --001636e1fbd133ebc7046be64717 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, i want to get the exact match between block number and sector number of a file in domU. so i do follows . root@feisty:~# ls -l total 1 -rw-r--r-- 1 root root 4 Jun 9 08:16 a root@feisty:~# filefrag -v a Checking a Filesystem type is: ef53 Filesystem cylinder groups is approximately 122 Blocksize of file a is 1024 File size of a is 2 (1 blocks) First block: 247208 Last block: 247208 a: 1 extent found the file has one block and block size is 247208, so the secoter size is 247208 *2 +1 == 78B51 and 247208*2 +2 == 78B52 (block number count begin from 0 , sector number count begin from 1). root@feisty:~# echo "a" >> a command above is a write to a file root@feisty:~# tail /var/log/messages Jun 9 08:15:54 feisty kernel: do_blk_req cf9d1de8: cmd cf9d1e64, sec ae85e, (2/2) buffer:cf7a1800 [write] Jun 9 08:16:14 feisty kernel: do_blk_req cf9d152c: cmd cf9d15a8, sec ae7c6, (2/2) buffer:ce81ec00 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d152c: cmd cf9d15a8, sec 2, (2/2) buffer:d06ee400 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d1f40: cmd cf9d1fbc, sec 6, (2/2) buffer:d06eec00 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d1e94: cmd cf9d1f10, sec 880d0, (2/2) buffer:d0392000 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d1de8: cmd cf9d1e64, sec 880d4, (2/2) buffer:d0392800 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d11d0: cmd cf9d124c, sec 880d8, (2/2) buffer:cecdf000 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d127c: cmd cf9d12f8, sec ac002, (2/2) buffer:cf1e4400 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d1124: cmd cf9d11a0, sec ae25a, (2/2) buffer:cf652400 [write] Jun 9 08:16:19 feisty kernel: do_blk_req cf9d1b38: cmd cf9d1bb4, sec ae67c, (2/2) buffer:ce6d1800 [write] and then to show sector number i had written, i expect to see 78B51 or 78B52 sector number. but none of then display, can you tell me why? -- Regards, Sucan --001636e1fbd133ebc7046be64717 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

i want to get the exact match between block number and sector nu= mber of a file in domU. so i do follows .


root@feisty:~# ls -ltotal 1
-rw-r--r-- 1 root root 4 Jun=A0 9 08:16 a

root@feisty:~= # filefrag -v a
Checking a
Filesystem type is: ef53
Filesystem cylinder groups is app= roximately 122
Blo= cksize of file a is 1024=A0=A0
File size of a is 2 (1 blocks) First block: 247208
Last block: 247208
a: 1 extent found

the file has one block and block size is 247208, so the secoter= size is 247208 *2 +1 =3D=3D 78B51 and 247208*2 +2 =3D=3D 78B52 =A0=A0 (blo= ck number count begin from 0 , sector number count begin from 1).
root@feisty:~# echo "a" >> a

command above is a write to a file

root@feisty:~# tail /var/log/messages
Jun=A0 9 08:15:54 feisty= kernel: do_blk_req cf9d1de8: cmd cf9d1e64, sec ae85e, (2/2) buffer:cf7a180= 0 [write]
Jun=A0 9 08:16:14 feisty kernel: do_blk_req cf9d152c: cmd cf9d15a8, sec ae7= c6, (2/2) buffer:ce81ec00 [write]
Jun=A0 9 08:16:19 feisty kernel: do_bl= k_req cf9d152c: cmd cf9d15a8, sec 2, (2/2) buffer:d06ee400 [write]
Jun= =A0 9 08:16:19 feisty kernel: do_blk_req cf9d1f40: cmd cf9d1fbc, sec 6, (2/= 2) buffer:d06eec00 [write]
Jun=A0 9 08:16:19 feisty kernel: do_blk_req cf9d1e94: cmd cf9d1f10, sec 880= d0, (2/2) buffer:d0392000 [write]
Jun=A0 9 08:16:19 feisty kernel: do_bl= k_req cf9d1de8: cmd cf9d1e64, sec 880d4, (2/2) buffer:d0392800 [write]
Jun=A0 9 08:16:19 feisty kernel: do_blk_req cf9d11d0: cmd cf9d124c, sec 880= d8, (2/2) buffer:cecdf000 [write]
Jun=A0 9 08:16:19 feisty kernel: do_blk_req cf9d127c: cmd cf9d12f8, sec ac0= 02, (2/2) buffer:cf1e4400 [write]
Jun=A0 9 08:16:19 feisty kernel: do_bl= k_req cf9d1124: cmd cf9d11a0, sec ae25a, (2/2) buffer:cf652400 [write]
Jun=A0 9 08:16:19 feisty kernel: do_blk_req cf9d1b38: cmd cf9d1bb4, sec ae6= 7c, (2/2) buffer:ce6d1800 [write]

and then to show = sector number i had written, i expect to see 78B51 or 78B52 sector number. = but none of then display, can you tell me why?

--
Regards,
Sucan
--001636e1fbd133ebc7046be64717-- --===============1915691937== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1915691937==--