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: <CAKYAXd_EYrfF0iQVw5FJRHkGCeMTUoQdx+BogV+-g9vqXeGZdw@mail.gmail.com>
Date:	Tue, 4 Feb 2014 08:04:50 +0900
From:	Namjae Jeon <linkinjeon@...il.com>
To:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:	akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Namjae Jeon <namjae.jeon@...sung.com>,
	Amit Sahrawat <a.sahrawat@...sung.com>
Subject: Re: [PATCH v3 2/6] fat: add fat_fallocate operation

2014-02-03, OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>:
>
> Sorry for long delay.
>
> Namjae Jeon <linkinjeon@...il.com> writes:
>
>> +	if (mode & FALLOC_FL_KEEP_SIZE) {
>> +		/* First compute the number of clusters to be allocated */
>> +		mm_bytes = offset + len - round_up(MSDOS_I(inode)->mmu_private,
>> +			sbi->cluster_size);
>
Hi OGAWA.
> This should use ->i_disksize?
Right, I will fix it.
>
> [...]
>
>> +		/* Release unwritten fallocated blocks on inode eviction. */
>> +		if (MSDOS_I(inode)->mmu_private < MSDOS_I(inode)->i_disksize) {
>> +			int err;
>> +			fat_truncate_blocks(inode, MSDOS_I(inode)->mmu_private);
>> +			/* Fallocate results in updating the i_start/iogstart
>> +			 * for the zero byte file. So, make it return to
>> +			 * original state during evict and commit it
>> +			 * synchrnously to avoid any corruption on the next
>> +			 * access to the cluster chain for the file.
>> +			 */
>> +			err = fat_sync_inode(inode);
>
> Ah, good catch. We have to update i_size. I was forgetting about this.
> Well, sync inode unconditionally would not be good. Maybe, we better to
> use __fat_write_inode() with inode_needs_sync() or such.
Okay, I will change it.

Thanks.
> --
> OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ