Re: [PATCH v2] xfs: probe data buffer from page cache for unwritten extents

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

 



On 06/25/12 07:41, Jeff Liu wrote:
Hello,

Using the start offset rather than map->br_startoff to calculate the starting page index could
get more accurate data offset in page cache probe routine.
With this refinement, the old max_t() could be able to remove too.

Thanks Mark for pointing this out!

-Jeff


Cc: Mark Tinguely<tinguely@xxxxxxx>
Signed-off-by: Jie Liu<jeff.liu@xxxxxxxxxx>

---

+			/*
+			 * xfs_bmapi_read() can handle repeated hole regions,
+			 * hence it should not return two extents both are
+			 * holes.  If the 2nd extent is unwritten, there must
+			 * have data buffer resides in page cache.
+			 */
+			BUG();


Looks great.

I hit the BUG() using a test with the following test:

 hole
 unwritten (treated as a hole)
 unwritten (treated as a hole)
 page of data.

I will send the current version of the test program.

--Mark.

_______________________________________________
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