From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tao Ma Date: Mon, 26 Apr 2010 14:45:36 +0800 Subject: [Ocfs2-devel] [PATCH v2] ocfs2: make ocfs2_adjust_resv_from_alloc simple. In-Reply-To: <20100423220342.GC8330@mail.oracle.com> References: <20100407212423.GP11402@wotan.suse.de> <1270715582-13702-1-git-send-email-tao.ma@oracle.com> <20100423220342.GC8330@mail.oracle.com> Message-ID: <4BD53690.9030508@oracle.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ocfs2-devel@oss.oracle.com Joel Becker wrote: > On Thu, Apr 08, 2010 at 04:33:02PM +0800, Tao Ma wrote: >> When we allocate some bits from the reservation, we always >> allocate from the r_start(see ocfs2_resmap_resv_bits). >> So there should be no sense for checking between r_start >> and start. And I don't think we will change this behaviour >> somehow later by allocating from some bits after r_start. >> Why not make ocfs2_adjust_resv_from_alloc simple now? >> >> So the only chance we have to adjust the reservation is that >> we haven't reached the end. With this patch, the function is >> more readable. >> >> Note: >> btw, this patch also fixes an original bug in the function >> which I haven't found before. >> if (end < ocfs2_resv_end(resv)) >> rhs = end - ocfs2_resv_end(resv); >> This code is of course buggy. ;) >> >> Cc: Mark Fasheh >> Signed-off-by: Tao Ma > > This patch is now in the 'merge-window' branch of ocfs2.git. thanks, joel. btw, you still miss another patch which Mark has acked for the merge-window. http://oss.oracle.com/pipermail/ocfs2-devel/2010-April/006250.html Regards, Tao