mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-23 18:14:25 +08:00
Merge branch 'maint' into next
This commit is contained in:
commit
ac1e303c51
@ -26,6 +26,9 @@ extern char *optarg;
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#include "debugfs.h"
|
||||
#include "uuid/uuid.h"
|
||||
|
@ -36,6 +36,9 @@
|
||||
#if HAVE_SYS_MKDEV_H
|
||||
#include <sys/mkdev.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
#include "blkidP.h"
|
||||
|
@ -31,6 +31,9 @@
|
||||
#if HAVE_SYS_MKDEV_H
|
||||
#include <sys/mkdev.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#include "blkidP.h"
|
||||
|
||||
|
@ -31,6 +31,9 @@
|
||||
#if HAVE_SYS_MKDEV_H
|
||||
#include <sys/mkdev.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#include "ext2_fs.h"
|
||||
#include "ext2fs.h"
|
||||
|
@ -49,6 +49,9 @@
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#include "ext2_fs.h"
|
||||
#include "ext2fs.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
#include <attr/xattr.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#include <ext2fs/ext2fs.h>
|
||||
#include <ext2fs/ext2_types.h>
|
||||
#include <ext2fs/fiemap.h>
|
||||
|
@ -35,6 +35,9 @@ extern int optind;
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
#include <libgen.h>
|
||||
#include <limits.h>
|
||||
#include <blkid/blkid.h>
|
||||
@ -260,6 +263,7 @@ static errcode_t mk_hugefile(ext2_filsys fs, blk64_t num,
|
||||
{
|
||||
errcode_t retval;
|
||||
struct ext2_inode inode;
|
||||
int falloc_flags;
|
||||
|
||||
retval = ext2fs_new_inode(fs, 0, LINUX_S_IFREG, NULL, ino);
|
||||
if (retval)
|
||||
@ -281,10 +285,11 @@ static errcode_t mk_hugefile(ext2_filsys fs, blk64_t num,
|
||||
|
||||
if (ext2fs_has_feature_extents(fs->super))
|
||||
inode.i_flags |= EXT4_EXTENTS_FL;
|
||||
retval = ext2fs_fallocate(fs,
|
||||
EXT2_FALLOCATE_FORCE_INIT |
|
||||
EXT2_FALLOCATE_ZERO_BLOCKS,
|
||||
*ino, &inode, goal, 0, num);
|
||||
|
||||
falloc_flags = EXT2_FALLOCATE_FORCE_INIT;
|
||||
if (zero_hugefile)
|
||||
falloc_flags |= EXT2_FALLOCATE_ZERO_BLOCKS;
|
||||
retval = ext2fs_fallocate(fs, falloc_flags, *ino, &inode, goal, 0, num);
|
||||
if (retval)
|
||||
return retval;
|
||||
retval = ext2fs_inode_size_set(fs, &inode, num * fs->blocksize);
|
||||
|
Loading…
Reference in New Issue
Block a user