From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752411AbcGDO3m (ORCPT ); Mon, 4 Jul 2016 10:29:42 -0400 Received: from imap.thunk.org ([74.207.234.97]:44316 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbcGDO3l (ORCPT ); Mon, 4 Jul 2016 10:29:41 -0400 Date: Mon, 4 Jul 2016 10:29:38 -0400 From: "Theodore Ts'o" To: "Pranay Kr. Srivastava" Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1]ext4: Fix WARN_ON_ONCE when marking buffer dirty Message-ID: <20160704142938.GB29557@thunk.org> Mail-Followup-To: Theodore Ts'o , "Pranay Kr. Srivastava" , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <1467285150-15977-1-git-send-email-pranjas@gmail.com> <1467285150-15977-2-git-send-email-pranjas@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467285150-15977-2-git-send-email-pranjas@gmail.com> User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2016 at 02:12:30PM +0300, Pranay Kr. Srivastava wrote: > Signed-off-by: Pranay Kr. Srivastava The description for why the change is being made should go in the commit. (No need to put the description in a separate cover letter.) I ended up rewriting the commit description as follows, to make it much more understandable: ext4: Fix WARN_ON_ONCE in ext4_commit_super() If there are racing calls to ext4_commit_super() it's possible for another writeback of the superblock to result in the buffer being marked with an error after we check if the buffer is marked as having a write error and the buffer up-to-date flag is set again. If that happens mark_buffer_dirty() can end up throwing a WARN_ON_ONCE. Fix this by moving this check to write before we call write_buffer_dirty(), and keeping the buffer locked during this whole sequence. Signed-off-by: Pranay Kr. Srivastava Signed-off-by: Theodore Ts'o Note that the one-line summary needs to carry as much information as possible so someone who is scanning the commits using git log --oneline has a chance of understanding it. This means the high-level *why* of the commit, not a summary of what the changes in the C code. Also note the increased context of when the misbehaviour could occur in the commit description, which was missing in the cover letter. When I'm processing patches, if I'm in a hurry, patches that require extra work or which aren't Obviously Right, sometimes get deferred by a few days. This patch fell in that category. Adding to the commit descrtipion additional context and/or instructions for how to reproduce the problem you are trying to remediate will often make life much easier for me, and accelerate how quickly I'll get to your patch. Cheers, - Ted