From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933475AbbEEWC0 (ORCPT ); Tue, 5 May 2015 18:02:26 -0400 Received: from ipmail04.adl6.internode.on.net ([150.101.137.141]:52879 "EHLO ipmail04.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933205AbbEEWCV (ORCPT ); Tue, 5 May 2015 18:02:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BEBwB2PUlVPH8+LHlcgwyHeq1IAQEBAQEGmwxNAQEBAQEBBwEBAQFBP4R9IxiBAgMHiFjFIoYXikSEFwWeF41QhzuBA2YBAQgCAYIzLIJ2AQEB From: Dave Chinner To: xfs@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH 0/2] xfs: fix inode count underrun Date: Wed, 6 May 2015 08:01:37 +1000 Message-Id: <1430863299-9341-1-git-send-email-david@fromorbit.com> X-Mailer: git-send-email 2.0.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi folks, With the conversion of XFS to use the generic per-cpu superblocks, I overlooked the fact that the update batch size is important to the accuracy of the comparison function. Using different batch sizes means percpu_counter_compare() doesn't detect when it should fall back to percpu_counter_sum() for accuracy correctly, resulting in counter comparisons being inaccurate. This leads to problems with zero threshold detection in XFS. To fix, add __percpu_counter_compare() to take a caller supplied batch size. This fixes the XFS regression introduced in 4.1-rc1. -Dave.