[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170430042605.v3myihn2x4lolmso@thunk.org>
Date: Sun, 30 Apr 2017 00:26:05 -0400
From: Theodore Ts'o <tytso@....edu>
To: Lukas Czerner <lczerner@...hat.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/2] ext4: no need to cond_resched() in
ext4_trim_all_free()
On Thu, Apr 27, 2017 at 10:36:40AM +0200, Lukas Czerner wrote:
> There is no need to call cond_resched() in ext4_trim_all_free() since
> blkdev_issue_discard() already takes care of that. So just remove it.
Actually, it could be needed. If minblocks is a small value, say 2,
and every other block in file system is allocated, then we could be in
the while loop for a long time. That's a pretty unusual case, but
it's good to have the need_resched() check there.
- Ted
Powered by blists - more mailing lists