From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aXmkL-0006r1-VX for mharc-grub-devel@gnu.org; Mon, 22 Feb 2016 04:25:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXmkJ-0006ow-5D for grub-devel@gnu.org; Mon, 22 Feb 2016 04:25:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXmkE-0008Hi-0o for grub-devel@gnu.org; Mon, 22 Feb 2016 04:25:34 -0500 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:36674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXmkD-0008HS-P7 for grub-devel@gnu.org; Mon, 22 Feb 2016 04:25:29 -0500 Received: by mail-lb0-x235.google.com with SMTP id x1so78312060lbj.3 for ; Mon, 22 Feb 2016 01:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=GfWnfBv8VH/LBi0zdOdnfDS/GLElvMkfR8sVSNfX/Kk=; b=vUOQG8F4MT38c3kiFKlCUhbM+4mx3h7z0qjeko/GcKSbW4ztsn5KrWMRuqf0XstPKf GdOnElxUbJvBLzfpLH45cBg6ZpHu2JyIOuapopbvSuTf/Jm1+7qEk6MXVz5xi8bIzUUa TOkqdL174WjrtyqvmZiP8EOmEvxTnqciKspZjQgEtZOyd00+wpZx3JTeNomlH9SR//nU p8DN9htEhZnSYjbo3xg1z7vggeNw/hGIGhAXDuKP1s2vNx3MAE9PMagkJ0CDiaKMiLv9 rWXmHocO7/JJ3s04MX8xxtqfWmBUS5FjMvGPGewNRp6Ijpk9ttwY0BcEu3HrABAUh5es GgXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=GfWnfBv8VH/LBi0zdOdnfDS/GLElvMkfR8sVSNfX/Kk=; b=lDMLSkdpuVg+jXkQ0sYCeJoiCwzPwySEb9B8SgIwE4sUfjkQp1D7e5lc6gTdaIm4QR IYhkIYDzYJ/ysfmfsz2KxKJe5lBY3wsdEWseNmYql8ytfamE0HlgHxyTyfz9GTjeGXBG tsJfuA4/RdVFhQvI1tGF2SnUo31z4Mkl1e3DajCyVkxBoZk7F27ajDwVFH/2YzOjsYmj XFzn2d92OwIcLQf3u1076lBSOccnxewBAXwfffQwbQkntLLIAHrZ+0SWa/4jVL/39twW q1yKwZ+wTEI5/6Tpvr+QvQea+kJK5r1c47PAn7L5nHPuY2FtL3Fv6ElgdIhlhEhb9BVI KGpQ== X-Gm-Message-State: AG10YOQB+hWRKXglBPflVcCcBgf1czg/5xovKfBibh494dilWN7crPlPBb01jk3ClNE10A== X-Received: by 10.112.140.169 with SMTP id rh9mr8278045lbb.69.1456133128957; Mon, 22 Feb 2016 01:25:28 -0800 (PST) Received: from [192.168.1.41] (ppp109-252-76-159.pppoe.spdop.ru. [109.252.76.159]) by smtp.gmail.com with ESMTPSA id h8sm3148762lbd.48.2016.02.22.01.25.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Feb 2016 01:25:27 -0800 (PST) Subject: Re: [f2fs-dev] [PATCH v6] F2FS support To: Jaegeuk Kim 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> From: Andrei Borzenkov Message-ID: <56CAD406.3030508@gmail.com> Date: Mon, 22 Feb 2016 12:25:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160108194132.GA17464@jaegeuk.aosp> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::235 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 09:25:36 -0000 08.01.2016 22:41, Jaegeuk Kim пишет: > Change log from v5: > o fix build warning for ARM, reported by Michael Zimmermann > > Thanks to Michael for testing this patch. > > -- >8 -- > From 284fd66662a6d5e07770cc021c8f59b538471c35 Mon Sep 17 00:00:00 2001 > From: Jaegeuk Kim > Date: Tue, 17 Nov 2015 12:45:13 -0800 > Subject: [PATCH] F2FS support > > "F2FS (Flash-Friendly File System) is flash-friendly file system which was merged > into Linux kernel v3.8 in 2013. > > The motive for F2FS was to build a file system that from the start, takes into > account the characteristics of NAND flash memory-based storage devices (such as > solid-state disks, eMMC, and SD cards). > > 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 according to > its internal geometry or flash memory management scheme (such as the Flash > Translation Layer or FTL), it supports various parameters not only for > configuring on-disk layout, but also for selecting allocation and cleaning > algorithm.", quote by https://en.wikipedia.org/wiki/F2FS. > > The source codes for F2FS are available from: > > http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git > http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git > Sorry for delay. I'm fine with it (with single nitpick, see below); Vladimir has final word whether this can be committed. ... > +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 = &node->inode.i; > + grub_off_t filesize = grub_f2fs_file_size (inode); > + char *inline_addr = __inline_addr (inode); > + > + if (inode->i_inline & F2FS_INLINE_DATA) > + { > + if (pos > filesize || filesize > MAX_INLINE_DATA) GRUB checks that pos < filesize before calling into fs so this is redundant. And filesize check is static so can be done in ->open.