From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aXv7X-0003Tv-Hb for mharc-grub-devel@gnu.org; Mon, 22 Feb 2016 13:22:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXv7U-0003TO-M1 for grub-devel@gnu.org; Mon, 22 Feb 2016 13:22:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXv7R-0000fe-Uk for grub-devel@gnu.org; Mon, 22 Feb 2016 13:22:04 -0500 Received: from mail.kernel.org ([198.145.29.136]:46449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXv7R-0000fY-NK for grub-devel@gnu.org; Mon, 22 Feb 2016 13:22:01 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 27D70203B0; Mon, 22 Feb 2016 18:21:51 +0000 (UTC) Received: from localhost (107-1-141-74-ip-static.hfc.comcastbusiness.net [107.1.141.74]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C06E8204AE; Mon, 22 Feb 2016 18:21:41 +0000 (UTC) Date: Mon, 22 Feb 2016 10:21:49 -0800 From: Jaegeuk Kim To: Andrei Borzenkov Subject: Re: [f2fs-dev] [PATCH v6] F2FS support Message-ID: <20160222182149.GC10875@jaegeuk.gateway> References: <1427185140-41120-1-git-send-email-jaegeuk@kernel.org> <20150403224908.GB25673@jaegeuk-mac02.mot.com> <20151119212824.GA11666@jaegeuk.local> <566E7DAA.4010202@gmail.com> <20151215003421.GD48918@jaegeuk.local> <20151215181439.GA60773@jaegeuk.local> <20160108194132.GA17464@jaegeuk.aosp> <56CAD406.3030508@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56CAD406.3030508@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 198.145.29.136 Cc: The development of GNU GRUB , linux-f2fs-devel@lists.sourceforge.net X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2016 18:22:05 -0000 Hi Andrei, I'll send v7 which addresses your comment. Thanks, On Mon, Feb 22, 2016 at 12:25:26PM +0300, Andrei Borzenkov wrote: > 08.01.2016 22:41, Jaegeuk Kim =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > Change log from v5: > > o fix build warning for ARM, reported by Michael Zimmermann > >=20 > > Thanks to Michael for testing this patch. > >=20 > > -- >8 -- > > From 284fd66662a6d5e07770cc021c8f59b538471c35 Mon Sep 17 00:00:00 200= 1 > > From: Jaegeuk Kim > > Date: Tue, 17 Nov 2015 12:45:13 -0800 > > Subject: [PATCH] F2FS support > >=20 > > "F2FS (Flash-Friendly File System) is flash-friendly file system whic= h was merged > > into Linux kernel v3.8 in 2013. > >=20 > > The motive for F2FS was to build a file system that from the start, t= akes into > > account the characteristics of NAND flash memory-based storage device= s (such as > > solid-state disks, eMMC, and SD cards). > >=20 > > F2FS was designed on a basis of a log-structured file system approach= , which > > remedies some known issues of the older log structured file systems, = such as > > the snowball effect of wandering trees and high cleaning overhead. In= addition, > > since a NAND-based storage device shows different characteristics acc= ording to > > its internal geometry or flash memory management scheme (such as the = Flash > > Translation Layer or FTL), it supports various parameters not only fo= r > > configuring on-disk layout, but also for selecting allocation and cle= aning > > algorithm.", quote by https://en.wikipedia.org/wiki/F2FS. > >=20 > > The source codes for F2FS are available from: > >=20 > > http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git > > http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git > >=20 >=20 > Sorry for delay. I'm fine with it (with single nitpick, see below); > Vladimir has final word whether this can be committed. > ... >=20 > > +static grub_ssize_t > > +grub_f2fs_read_file (grub_fshelp_node_t node, > > + grub_disk_read_hook_t read_hook, void *read_hook_data, > > + grub_off_t pos, grub_size_t len, char *buf) > > +{ > > + struct grub_f2fs_inode *inode =3D &node->inode.i; > > + grub_off_t filesize =3D grub_f2fs_file_size (inode); > > + char *inline_addr =3D __inline_addr (inode); > > + > > + if (inode->i_inline & F2FS_INLINE_DATA) > > + { > > + if (pos > filesize || filesize > MAX_INLINE_DATA) >=20 > GRUB checks that pos < filesize before calling into fs so this is > redundant. And filesize check is static so can be done in ->open.