lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTimpp7YeAWh-Eq8vKVAXAv=qKQgWew@mail.gmail.com>
Date:	Sun, 3 Apr 2011 22:51:39 +0800
From:	Yongqiang Yang <xiaoqiangnk@...il.com>
To:	Ding Dinghua <dingdinghua85@...il.com>
Cc:	Amir Goldstein <amir73il@...il.com>, linux-ext4@...r.kernel.org
Subject: Re: Is this a bug?

On Sun, Apr 3, 2011 at 5:24 PM, Ding Dinghua <dingdinghua85@...il.com> wrote:
> 2011/4/3 Amir Goldstein <amir73il@...il.com>:
>> On Sat, Apr 2, 2011 at 1:05 AM, Ding Dinghua <dingdinghua85@...il.com> wrote:
>>> When truncate files and free blocks, the following codes make me puzzled:
>>>
>>> void ext4_free_blocks(handle_t *handle, struct inode *inode,
>>>                      struct buffer_head *bh, ext4_fsblk_t block,
>>>                      unsigned long count, int flags)
>>> {
>>>        if (flags & EXT4_FREE_BLOCKS_FORGET) {
>>>                struct buffer_head *tbh = bh;
>>>                int i;
>>>
>>>                BUG_ON(bh && (count > 1));
>>>
>>>                for (i = 0; i < count; i++) {
>>>                        if (!bh)
>>>                                tbh = sb_find_get_block(inode->i_sb,
>>>                                                        block + i);
>>>                        if (unlikely(!tbh))
>>>                                continue;
>>>                        ext4_forget(handle, flags & EXT4_FREE_BLOCKS_METADATA,
>>>                                    inode, tbh, block + i);
>>>                }
>>>        }
>>> }
>>>
>>> I notice that ext4_forget mainly do two things:
>>>    a)  call jbd2_journa_forget to forget the modification of some buffer head
>>>    b)  or deal with the revoke issue
>>> however, if we are freeing data blocks && ext4_forget get into branch a),
>>
>> Simple. we don't pass the FORGET flag when freeing data blocks,
>> only when freeing metadata blocks, which may have been journalled
>> already.
>> I am not sure about the journal=data case through.
> Thanks for reply. The reason for me to dip into this issue is journal=data mode.
I think data processing in journal=data mode is similar to metadata
processing in joutnal=ordered mode.
>>
>>> tbh is not the buffer_head which journal took care of in ext4_write_begin,
>>> so i'm puzzled with this.
>>>
>>> Could anyone explain it to me? Thanks.
>>>
>>> --
>>> Ding Dinghua
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>>> the body of a message to majordomo@...r.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>
>
>
> --
> Ding Dinghua
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Best Wishes
Yongqiang Yang
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ