Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754923Ab0KEVKp (ORCPT ); Fri, 5 Nov 2010 17:10:45 -0400 Received: from mail09.linbit.com ([212.69.161.110]:42464 "EHLO mail09.linbit.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752956Ab0KEVKn (ORCPT ); Fri, 5 Nov 2010 17:10:43 -0400 X-Greylist: delayed 347 seconds by postgrey-1.27 at vger.kernel.org; Fri, 05 Nov 2010 17:10:43 EDT Date: Fri, 5 Nov 2010 22:04:54 +0100 From: Lars Ellenberg To: Mike Snitzer Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , Neil Brown , drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH] block: read i_size with i_size_read() Message-ID: <20101105210454.GE2321@barkeeper1-xen.linbit> Mail-Followup-To: Mike Snitzer , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , Neil Brown , drbd-dev@lists.linbit.com References: <1288985241-3515-1-git-send-email-snitzer@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1288985241-3515-1-git-send-email-snitzer@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1510 Lines: 40 On Fri, Nov 05, 2010 at 03:27:21PM -0400, Mike Snitzer wrote: > Convert direct reads of an inode's i_size to using i_size_read(). > > i_size_{read,write} use a seqcount to protect reads from accessing > incomple writes. Concurrent i_size_write()s require mutual exclussion > to protect the seqcount that is used by i_size_{read,write}. But > i_size_read() callers do not need to use additional locking. > > Signed-off-by: Mike Snitzer > Cc: Jens Axboe > Cc: Neil Brown > Cc: drbd-dev@lists.linbit.com > --- > block/blk-core.c | 4 ++-- > block/compat_ioctl.c | 4 ++-- > block/ioctl.c | 6 +++--- > drivers/block/drbd/drbd_int.h | 2 +- > drivers/md/md.c | 18 +++++++++--------- > 5 files changed, 17 insertions(+), 17 deletions(-) DRBD one line fix trivially Acked-by: Lars Ellenberg > NOTE: I stopped short of fixing drbd and nbd to use revalidate_disk > and/or i_size_write. Ok, we'll pick up the DRBD part of it. -- : Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com DRBD? and LINBIT? are registered trademarks of LINBIT, Austria. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/