All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about ext4_free_blocks() Behavior for Per-File Data Journaling Mode
@ 2015-10-14  4:39 Daeho Jeong
  0 siblings, 0 replies; 2+ messages in thread
From: Daeho Jeong @ 2015-10-14  4:39 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4

Hi. I have a question about ext4_free_blocks() behavior for per-file data journaling
mode. AFAIUI, in ext4_free_blocks(), it doesn't invoke ext4_forget() function for
data blocks of a per-file data journaling enabled file, because all the data blocks
of the file are not linked to the block device's address space of the file, but the
address space of the inode of the file, so any data blocks of the file cannot be
found by sb_find_get_block() function. It seems a bug, but I am not sure.
Is this a problem?

I think that, in ext4_free_blocks(), we have to find buffer heads of the file's data
,which are journaled, and transfer the found buffer heads to ext4_forget() in
order to forget and revoke the buffer head related journal record. For that, 
we might need to transfer the logical block numbers of the buffer heads of 
files' data blocks to ext4_free_blocks(). Do you have a better idea to resolve
this problem?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about ext4_free_blocks() Behavior for Per-File Data Journaling Mode
@ 2015-12-08  7:02 Daeho Jeong
  0 siblings, 0 replies; 2+ messages in thread
From: Daeho Jeong @ 2015-12-08  7:02 UTC (permalink / raw)
  To: tytso, jack; +Cc: Daeho Jeong, linux-ext4

> Hi. I have a question about ext4_free_blocks() behavior for per-file data journaling
> mode. AFAIUI, in ext4_free_blocks(), it doesn't invoke ext4_forget() function for
> data blocks of a per-file data journaling enabled file, because all the data blocks
> of the file are not linked to the block device's address space of the file, but the
> address space of the inode of the file, so any data blocks of the file cannot be
> found by sb_find_get_block() function. It seems a bug, but I am not sure.
> Is this a problem?

I just answer my own question. It was a silly question, because all the data buffers
of per-file data journalled file are forgotten by jbd2_journal_invalidatepage() in advance
of invoking ext4_free_blocks().

Anyway, the revoke operation to the data blocks is still missing in ext4_free_blocks().
I will fix this problem. :-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-08  7:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  4:39 Question about ext4_free_blocks() Behavior for Per-File Data Journaling Mode Daeho Jeong
2015-12-08  7:02 Daeho Jeong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.