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 пишет: > > 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 <jaeg...@kernel.org> > > 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. _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel