xfs_io bmap confused

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

 



Hi list,

I am testing some direct-io patches.
xfs_tests/xfs/080 failed.

It's strange.
There is no hole in "rwtest.file",
but when read it at some offset it returns zero because of hole.

root@block:~# xfs_io -c bmap /mnt/test/rwtest.file
/mnt/test/rwtest.file:
             0: [0..125671]: 160..125831

Then I read at file offset 659456,
root@block:~# dd if=/mnt/test/rwtest.file of=tmp.file bs=512 skip=1288 count=1

The code actually goes to below if statements.

Any idea what's wrong?

139 static struct bio *
140 do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
141                 sector_t *last_block_in_bio, struct buffer_head *map_bh,
142                 unsigned long *first_logical_block, get_block_t get_block)
143 {
....
....
209                 if (!buffer_mapped(map_bh)) {
210                         fully_mapped = 0;
211                         if (first_hole == blocks_per_page)
212                                 first_hole = page_block;
213                         page_block++;
214                         block_in_file++;
215                         continue;
216                 }
....
....
249         if (first_hole != blocks_per_page) {
250                 zero_user_segment(page, first_hole << blkbits, PAGE_CACHE_SIZE);
251                 if (first_hole == 0) {
252                         SetPageUptodate(page);
253                         unlock_page(page);
254                         goto out;
255                 }

Thanks,
Ming


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux