Whamcloud - gitweb
LU-2576 osc: various fix in osc_enter_cache()
- It should not go to sleep if there isn't any inflight write
RPC, otherwise, it could not be waked up for a long time,
until dirty flush triggered on other OSCs or other objects.
- If the page can't be granted due to too many dirty pages
(> obd_max_dirty_pages), osc_enter_cache() should return
-EDQUOT.
- It should pass NULL osc object to osc_io_unplug(), otherwise
dirty flush can't be triggered if the passed object is
clean.
- It should not wait in a loop of "while (cli->cl_dirty > 0)",
trigger the dirty flush once is enough. If there are too
many threads that consumed grants immediately, then we
should turn to sync write, but not trigger flush and wait
for grant again (that'll block io process on grant).
- Refuse setting max_dirty_mb as 0 via proc file.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I449cba07bd427749ab023c249d9e200aba1b406a
Reviewed-on: http://review.whamcloud.com/4963
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>