lkml.org 
[lkml]   [2012]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Jfs-discussion] [PATCH] fs/jfs: TRIM support for JFS Filesystem


On 08/01/2012 02:29 PM, Tino Reichardt wrote:
> * Dave Kleikamp <dave.kleikamp@oracle.com> wrote:
>> On 07/28/2012 06:08 AM, Tino Reichardt wrote:

>>> + tt->nblocks = 0; /* mark the current end */
>>> + for (tt = totrim; tt->nblocks != 0; tt++) {
>>> + if (!(JFS_SBI(sb)->flag & JFS_DISCARD)) {
>>> + /* not needed, when online discard is used */
>>
>> Why enter the function at all if JFS_DISCARD is set? But is this really
>> true? Removing files or file fragments that are smaller than
>> minblks_trim will fail to discard them dynamically.
>
> The other FS can also trim via fstrim(8) when mounted with discard
> option :) It is important, that a user can discard all free blocks, even
> when mounting with discard option. The FS could also be mounted several
> times without discard option, and then there are some ranges, where the
> device isn't informed about these ranges. So the batched discard ioctl()
> is then the only way to change that.
>
>
> The comment there was also a bit updated, here is it:
>
> /* when mounted with online discard, dbFree() will
> * call jfs_issue_discard() itself */

Ah. This comments makes it clear. I was forgetting that dbFree will
handle this.

Thanks,
Dave


\
 
 \ /
  Last update: 2012-08-01 23:01    [W:0.067 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site