[Ocfs2-devel] [PATCH] ocfs2: avoid direct write if we fall back to buffered

Joel Becker Joel.Becker at oracle.com
Fri Apr 23 13:06:18 PDT 2010


On Thu, Apr 22, 2010 at 10:13:51PM +0800, Li Dongyang wrote:
> another question: why do we only take PR on the rw_lock and do not allow a 
> direct write extending the i_size?

	The rw_lock is the cluster equivalent of the alloc_sem.  We take
a PR when we intend to use the existing allocation but will not modify
the allocation.  When we want to change the allocation (filling holes,
changing unwritten extents, growing i_size) we must take an EX.

Joel

-- 

Life's Little Instruction Book #30

	"Never buy a house without a fireplace."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-devel mailing list