From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Monakhov Subject: [PATCH 00/12] quota: Redesign IO error handling interface V2 Date: Wed, 19 May 2010 10:01:56 +0400 Message-ID: <1274248928-5113-1-git-send-email-dmonakhov@openvz.org> Cc: jack@suse.cz, hch@infradead.org, Dmitry Monakhov To: linux-fsdevel@vger.kernel.org Return-path: Received: from fg-out-1718.google.com ([72.14.220.153]:56752 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813Ab0ESGCR (ORCPT ); Wed, 19 May 2010 02:02:17 -0400 Received: by fg-out-1718.google.com with SMTP id d23so3579907fga.1 for ; Tue, 18 May 2010 23:02:15 -0700 (PDT) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: This patchset is tended to provide interface for handling IO errors from internal quota code. Any error must being returned to fs-caller to signal about possible quota inconsistency. I've done it in following way: 1) Handle low-level io errors from dqget() and it's callers 2) Handle errors from dquot_initialize This path catch most of IO error, but no all. 3) Check what i_dquot was initialized in each low-level function. There are two types of such functions 3A) Charging functions (alloc_{space,inode}): Caller of such function may easy handle an error and abort an operation. 3B) nofail functions (claim_space,free_{space,inode}) In most cases caller can not abort an operation even if inode's quotas was semi-initialized, so I just skip this functions for now. Notes: Ext{3,4} orphan_list_cleanup patch may be folded to corresponding dquot_initialize() patch, but IMHO this makes review more complicate. Changes from V2 - First patch (unify quota init condition in setattr) was accepted. - Fix according to Jan's comments. Except error handling in charge methods - Add missed error handling in add_dquot_ref - Split fs-speciffic callers of dquot_initialize() in to per-fs parts. This makes number of patches dangerously big, but this is the only way to make things right(Thank Jan for an suggestion). Signed-off-by: Dmitry Monakhov