Re: [PATCH RFC 2/3] NFS41: send real write size in layoutget

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

 



On Wed, 2012-08-08 at 10:03 +0800, Peng Tao wrote:
> From: Peng Tao <tao.peng@xxxxxxx>
> 
> For bufferred write, scan dirty pages to find out longest continuous
> dirty pages. In this case, also allow layout driver to specify a
> maximum layoutget size which is useful to avoid busy scanning dirty pages
> for block layout client.

This is _really_ ugly, and is a source of potential deadlocks if
multiple threads are scanning+locking pages at the same time.

Why not simplify this by dropping the complicated tests for whether or
not the pages are dirty? That gets rid of the deadlock-prone lock_page()
calls, and would enable you to just use radix_tree_next_hole().

> For direct write, just use dreq->bytes_left.

This makes sense.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux