From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Shapovalov Subject: [RFC] [PATCH 5/7] reiser4: txnmgr: call reiser4_post_write_back_hook() for empty atoms. Date: Sun, 17 Aug 2014 19:43:24 +0400 Message-ID: <1408290206-7427-6-git-send-email-intelfx100@gmail.com> References: <1408290206-7427-1-git-send-email-intelfx100@gmail.com> Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nj+8/JI21rDb1IEv2WwXd+ECblRbouZ1mby4eXjOKGk=; b=oCzbwWIyCt1t3zgPcoNDTaBwMjh0YVH5HrCkDVDf6MkRZW2L1X7NMNvJ9333nxvplW v9YA2fiwKNgvtgXVnDr6QM5O30n8znhRr04qYP5JIFUVtc0rHNj1M93kY4tW13sof8q0 L7bdndHQxetAVoJXM9Jbamj/KDMN5L4UTuwh0E1fcM2HwzkMlV8EnX/YzUfikbgm0jx7 05Odhj8v7qVDnHBIHSkyUUKvmVLclFT59d5LjGH/AWUXT0M7QEb+EfEmbBfl7a++1esC IT6XX0d33onn5y+2mtqvibIjFq5FJIwNdaqdxMslSk274b0RPnoLn66cqLvEYJBw1Ug4 3ynA== In-Reply-To: <1408290206-7427-1-git-send-email-intelfx100@gmail.com> Sender: reiserfs-devel-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: reiserfs-devel@vger.kernel.org Cc: edward.shishkin@gmail.com, Ivan Shapovalov The atoms generated by reiser4_trim_fs(), despite being empty (zero capture_count), still have non-empty delete sets which have to be processed. Signed-off-by: Ivan Shapovalov --- fs/reiser4/txnmgr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/reiser4/txnmgr.c b/fs/reiser4/txnmgr.c index 2862940..3f44c9c 100644 --- a/fs/reiser4/txnmgr.c +++ b/fs/reiser4/txnmgr.c @@ -1064,8 +1064,13 @@ static int commit_current_atom(long *nr_submitted, txn_atom ** atom) return RETERR(-E_REPEAT); } - if ((*atom)->capture_count == 0) + if ((*atom)->capture_count == 0) { + /* Process the atom's delete set. + * Even if the atom has no captured nodes, the delete set may + * still be non-empty (see e. g. reiser4_trim_fs()). */ + reiser4_post_writeback_hook(); goto done; + } /* Up to this point we have been flushing and after flush is called we return -E_REPEAT. Now we can commit. We cannot return -E_REPEAT -- 2.0.4