Whamcloud - gitweb
LU-481 Don't store 'transient' page in radix tree
- We currently store both 'transient' page and inode page in the
same radix tree, which will cause trouble for the race handling
of concurrent dio and buffered read, imagine the following case:
dio created a 'transient' page for a given file offset in the
radix tree, while a concurrent buffered read on the same offset
happened, the reader will try to find the exsting cached page by
searching the radix tree, however, the 'transient' page is found,
and the read will fail for -EBUSY at the end.
To make the situation worse, there are two level of radix trees for
a give file page (object and sub-object), above race can happen
in both levels and we have to make sure page type consistence
between these two levels.
Actually, it doesn't make sense to store these disposable 'transient'
page in the radix tree, so we just remove them in this patch.
- In cl_page_alloc(), if the coo_page_init() fails, we should call
cl_page_delete0() to break the linkage between vmpage and cl_page
before calling cl_page_free().
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: If2fa85495e6e78b330571b3348ac55a7796a4a9f
Reviewed-on: http://review.whamcloud.com/1072
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>