From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbdAMICD (ORCPT ); Fri, 13 Jan 2017 03:02:03 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:34436 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200AbdAMICC (ORCPT ); Fri, 13 Jan 2017 03:02:02 -0500 Date: Fri, 13 Jan 2017 00:01:59 -0800 From: Christoph Hellwig To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH 5/6] f2fs: add a kernel thread to issue discard commands asynchronously Message-ID: <20170113080159.GB31777@infradead.org> References: <20170112224407.54026-1-jaegeuk@kernel.org> <20170112224407.54026-5-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170112224407.54026-5-jaegeuk@kernel.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2017 at 02:44:06PM -0800, Jaegeuk Kim wrote: > This patch adds a kernel thread to issue discard commands. > It proposes three states, D_PREP, D_SUBMIT, and D_DONE to identify current > bio status. Why? Instead of creating the complexity of a thread you should look into issuing the discard bios asynchronously, which should help to simplify a lot of the discard logic in f2fs.