Commit 1d0ca184 authored by Christopher Huhn's avatar Christopher Huhn 🥚
Browse files

Merge tag '2.12.6' into debian/buster

New tag 2.12.6
parents c99a4e72 ec36abd2
#!/bin/sh
DEFAULT_VERSION=2.12.4
DEFAULT_VERSION=2.12.6
LVF=LUSTRE-VERSION-FILE
LF='
......
......@@ -101,7 +101,9 @@ EXTRA_DIST = @PACKAGE_TARNAME@.spec \
lustre-dkms_post-build.sh \
LUSTRE-VERSION-GEN \
LUSTRE-VERSION-FILE \
undef.h
undef.h \
autogen.sh \
config/lustre-version.m4
# contrib is a directory. Putting a directory in EXTRA_DIST
# recursively includes the entire directory contents in the
......
......@@ -13,6 +13,8 @@ esac
AS_IF([test -z "$LDISKFS_SERIES"], [
AS_IF([test x$RHEL_KERNEL = xyes], [
case $RHEL_RELEASE_NO in
79) LDISKFS_SERIES="3.10-rhel7.9.series" ;;
78) LDISKFS_SERIES="3.10-rhel7.8.series" ;;
77) LDISKFS_SERIES="3.10-rhel7.7.series" ;;
76) LDISKFS_SERIES="3.10-rhel7.6.series" ;;
75) LDISKFS_SERIES="3.10-rhel7.5.series" ;;
......
......@@ -335,7 +335,7 @@ CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
AC_SUBST(CCASFLAGS)
# everyone builds against lnet and lustre
EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include"
EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include/uapi -I$PWD/lustre/include"
AC_SUBST(EXTRA_KCFLAGS)
]) # LB_PROG_CC
......
......@@ -19,6 +19,7 @@ init() {
readonly SAVE="$(basename $ORIGINAL).$(date +%Y%m%d.%H%M%S)"
readonly SIGNOFF="Signed-off-by:"
readonly CHANGEID="Change-Id:"
readonly FIXES="Fixes:"
readonly TESTPARAMS="Test-Parameters:"
readonly INNOCUOUS=$(echo \
Acked-by \
......@@ -106,6 +107,14 @@ function do_testparams() {
error "mdsfilesystemtype is deprecated, use mdtfilesystemtype"
}
function do_fixes() {
ck_wrapup
local commit=$(awk '{ print $2 }' <<<$LINE)
git describe --tags $commit 2>&1 | grep "[Nn]ot a valid" &&
error "has invalid $FIXES commit hash '$commit'"
}
# All "innocuous" lines specify a person and email address
#
function do_innocuous() {
......@@ -181,33 +190,35 @@ usage() {
LU-nnn component: short description of change under 64 columns
The "component:" should be a lower-case single-word subsystem of the
Lustre code that best encompasses the change being made. Examples of
components include modules like: llite, lov, lmv, osc, mdc, ldlm, lnet,
ptlrpc, mds, oss, osd, ldiskfs, libcfs, socklnd, o2iblnd; functional
subsystems like: recovery, quota, grant; and auxilliary areas like:
build, tests, docs. This list is not exhaustive, but is a guideline.
The commit comment should contain a detailed explanation of the change
being made. This can be as long as you'd like. Please give details
of what problem was solved (including error messages or problems that
were seen), a good high-level description of how it was solved, and
which parts of the code were changed (including important functions
that were changed, if this is useful to understand the patch, and
for easier searching). Wrap lines at/under $WIDTH_REG columns.
Finish the comment with a blank line and a blank-line-free
sign off section:
Lustre code best covering the patch. Example components include:
llite, lov, lmv, osc, mdc, ldlm, lnet, ptlrpc, mds, oss, osd,
ldiskfs, libcfs, socklnd, o2iblnd; recovery, quota, grant;
build, tests, docs.
This list is not exhaustive, but a guideline.
The comment body should explan the change being made. This can be
as long as needed. Please include details of the problem that was
solved (including error messages that were seen), a good high-level
description of how it was solved, and which parts of the code were
changed (including important functions that were changed, if this is
useful to understand the patch, and for easier searching).
Performance patches should quanify the improvements being seen.
Wrap lines at/under $WIDTH_REG columns.
Finish the comment with a blank line followed by the signoff section:
$SIGNOFF Your Real Name <your_email@domain.name>
$CHANGEID Ixxxx(added automatically if missing)xxxx
The "$CHANGEID" line should only be there when updating a previous
commit/submission. Copy the one from the original commit.
The "$CHANGEID" line should only be present when updating a previous
commit/submission. Copy the $CHANGEID from the original commit. It
will automatically be added by the Git commit-msg hook if missing.
The "sign off section" may also include several other tag lines:
The "signoff section" may optionally include other tag lines:
$(for T in $(tr '|' ' ' <<< "$INNOCUOUS"); do \
echo " $T: Some Person <email@domain.com>"; \
done)
$FIXES 12chrgithash ("summary of original broken patch")
$TESTPARAMS optional additional test parameters
{Organization}-bug-id: associated external change identifier
EOF
......@@ -222,9 +233,10 @@ exec 3< "$ORIGINAL" 4> "$REVISED" || exit 1
while IFS= read -u3 LINE; do
((NUM += 1))
case "$LINE" in
$SIGNOFF* ) do_signoff ;;
$CHANGEID* ) do_changeid ;;
$TESTPARAMS* ) do_testparams ;;
$SIGNOFF* ) do_signoff ;;
$CHANGEID* ) do_changeid ;;
$FIXES* ) do_fixes ;;
$TESTPARAMS* ) do_testparams ;;
"")
HAS_LAST_BLANK=true
......
......@@ -203,6 +203,7 @@ autodetect_target() {
sles11.4) target="$(uname -r | cut -d . -f 1,2)-sles11sp4";;
sles11.3) target="$(uname -r | cut -d . -f 1,2)-sles11sp3";;
sles11*) target="$(uname -r | cut -d . -f 1,2)-sles11";;
sles12.5) target="$(uname -r | cut -d . -f 1,2)-sles12sp5";;
sles12.4) target="$(uname -r | cut -d . -f 1,2)-sles12sp4";;
sles12.3) target="$(uname -r | cut -d . -f 1,2)-sles12sp3";;
sles12*) target="$(uname -r | cut -d . -f 1,2)-sles12";;
......
......@@ -185,7 +185,12 @@ find_linux_rpm-sles12() {
site="http://mgmt/cobbler/repo_mirror/$kdir"
;;
4.12)
site="http://mgmt/cobbler/repo_mirror/updates-sles12.4-x86_64"
kdir=updates-sles12.4-x86_64
if [ ${lnxrel%%.*} -ge 120 ]
then
kdir=updates-sles12.5-x86_64
fi
site="http://mgmt/cobbler/repo_mirror/$kdir"
;;
esac
if [ ! -f $pathtorpms/kernel-default-devel-$wanted_kernel.$(resolve_arch $TARGET_ARCH).rpm ]; then
......
......@@ -27,7 +27,7 @@ Package: lustre-client-utils
Section: utils
Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64
Priority: optional
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp30, zlib1g, perl
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp-dev, zlib1g, perl
Description: Userspace utilities for the Lustre filesystem (client)
Lustre is a scalable, secure, robust, highly-available cluster file system.
This release is maintained by Whamcloud and available from
......@@ -41,7 +41,7 @@ Package: lustre-server-utils
Section: utils
Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64
Priority: optional
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp30, zlib1g, perl
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp-dev, zlib1g, perl
Provides: lustre-server-utils, lustre-client-utils (= ${binary:Version})
Conflicts: lustre-client-utils
Replaces: lustre-client-utils
......@@ -85,7 +85,7 @@ Package: lustre-tests
Section: utils
Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64
Priority: optional
Depends: lustre-iokit (= ${binary:Version}), attr, rsync, perl, lsof, libtool, mpi-default-bin
Depends: lustre-iokit (= ${binary:Version}), attr, rsync, perl, lsof, libtool, libtool-bin, mpi-default-bin
Description: Test suite for the Lustre filesystem
Lustre is a scalable, secure, robust, highly-available cluster file system.
This release is maintained by Whamcloud and available from
......
......@@ -27,7 +27,7 @@ Package: lustre-client-utils
Section: utils
Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64
Priority: optional
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp30, zlib1g, perl
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp-dev, zlib1g, perl
Description: Userspace utilities for the Lustre filesystem (client)
Lustre is a scalable, secure, robust, highly-available cluster file system.
This release is maintained by Whamcloud and available from
......@@ -41,7 +41,7 @@ Package: lustre-server-utils
Section: utils
Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64
Priority: optional
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp30, zlib1g, perl
Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp-dev, zlib1g, perl
Provides: lustre-server-utils, lustre-client-utils (= ${binary:Version})
Conflicts: lustre-client-utils
Replaces: lustre-client-utils
......@@ -85,7 +85,7 @@ Package: lustre-tests
Section: utils
Architecture: i386 armhf powerpc ppc64el amd64 ia64 arm64
Priority: optional
Depends: lustre-iokit (= ${binary:Version}), attr, rsync, perl, lsof, libtool, mpi-default-bin
Depends: lustre-iokit (= ${binary:Version}), attr, rsync, perl, lsof, libtool, libtool-bin, mpi-default-bin
Description: Test suite for the Lustre filesystem
Lustre is a scalable, secure, robust, highly-available cluster file system.
This release is maintained by Whamcloud and available from
......
Index: linux-3.10.0-957.27.2.el7/fs/ext4/ext4.h
===================================================================
--- linux-3.10.0-957.27.2.el7.orig/fs/ext4/ext4.h
+++ linux-3.10.0-957.27.2.el7/fs/ext4/ext4.h
@@ -1539,6 +1539,7 @@ enum {
EXT4_STATE_NO_EXPAND, /* No space for expansion */
EXT4_STATE_DA_ALLOC_CLOSE, /* Alloc DA blks on close */
EXT4_STATE_EXT_MIGRATE, /* Inode is migrating */
+ EXT4_STATE_IAM, /* Lustre IAM objects */
EXT4_STATE_DIO_UNWRITTEN, /* need convert on dio done*/
EXT4_STATE_NEWENTRY, /* File just added to dir */
EXT4_STATE_DIOREAD_LOCK, /* Disable support for dio read
Index: linux-3.10.0-957.27.2.el7/fs/ext4/namei.c
===================================================================
--- linux-3.10.0-957.27.2.el7.orig/fs/ext4/namei.c
+++ linux-3.10.0-957.27.2.el7/fs/ext4/namei.c
@@ -58,8 +58,10 @@ struct buffer_head *ext4_append(handle_t
if (unlikely(EXT4_SB(inode->i_sb)->s_max_dir_size_kb &&
((inode->i_size >> 10) >=
- EXT4_SB(inode->i_sb)->s_max_dir_size_kb)))
- return ERR_PTR(-ENOSPC);
+ EXT4_SB(inode->i_sb)->s_max_dir_size_kb))) {
+ if (!ext4_test_inode_state(inode, EXT4_STATE_IAM))
+ return ERR_PTR(-ENOSPC);
+ }
/* with parallel dir operations all appends
* have to be serialized -bzzz */
......@@ -1012,6 +1012,20 @@ Index: linux-stage/fs/ext4/inode.c
return;
no_delete:
clear_inode(inode); /* We must guarantee clearing of inode... */
Index: linux-stage/fs/ext4/extents.c
===================================================================
--- linux-stage.orig/fs/ext4/extents.c
+++ linux-stage/fs/ext4/extents.c
@@ -2163,7 +2163,8 @@ int ext4_remove_blocks(handle_t *handle
unsigned short ee_len = ext4_ext_get_actual_len(ex);
int i, metadata = 0;
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ (EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL))
metadata = 1;
#ifdef EXTENTS_STATS
{
Index: linux-stage/fs/ext4/ialloc.c
===================================================================
--- linux-stage.orig/fs/ext4/ialloc.c
......@@ -1024,3 +1038,17 @@ Index: linux-stage/fs/ext4/ialloc.c
vfs_dq_free_inode(inode);
vfs_dq_drop(inode);
Index: linux-stage/fs/ext4/inode.c
===================================================================
--- linux-stage.orig/fs/ext4/inode.c
+++ linux-stage/fs/ext4/inode.c
@@ -4385,7 +4385,8 @@ static void ext4_clear_blocks(handle_t *h
__le32 *last)
{
__le32 *p;
- int is_metadata = S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode);
+ int is_metadata = S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ (EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL);
if (try_to_extend_transaction(handle, inode)) {
if (bh) {
......@@ -1066,6 +1066,20 @@ Index: linux-stage/fs/ext4/xattr.h
extern void ext4_xattr_put_super(struct super_block *);
extern int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
Index: linux-stage/fs/ext4/extents.c
===================================================================
--- linux-stage.orig/fs/ext4/extents.c
+++ linux-stage/fs/ext4/extents.c
@@ -2461,7 +2461,8 @@ int ext4_ext_index_trans_blocks(struct i
static inline int get_default_free_blocks_flags(struct inode *inode)
{
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ (EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL))
return EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET;
else if (ext4_should_journal_data(inode))
return EXT4_FREE_BLOCKS_FORGET;
Index: linux-stage/fs/ext4/ialloc.c
===================================================================
--- linux-stage.orig/fs/ext4/ialloc.c
......@@ -1078,6 +1092,20 @@ Index: linux-stage/fs/ext4/ialloc.c
dquot_free_inode(inode);
dquot_drop(inode);
Index: linux-stage/fs/ext4/indirect.c
===================================================================
--- linux-stage.orig/fs/ext4/indirect.c
+++ linux-stage/fs/ext4/indirect.c
@@ -959,7 +959,8 @@ static int ext4_clear_blocks(handle_t *h
int flags = EXT4_FREE_BLOCKS_VALIDATED;
int err;
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ (EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL))
flags |= EXT4_FREE_BLOCKS_FORGET | EXT4_FREE_BLOCKS_METADATA;
else if (ext4_should_journal_data(inode))
flags |= EXT4_FREE_BLOCKS_FORGET;
Index: linux-stage/fs/ext4/inline.c
===================================================================
--- linux-stage.orig/fs/ext4/inline.c
......
......@@ -8,7 +8,7 @@ Index: linux-stage/fs/ext4/ext4.h
===================================================================
--- linux-stage.orig/fs/ext4/ext4.h
+++ linux-stage/fs/ext4/ext4.h
@@ -1579,6 +1579,7 @@ static inline void ext4_clear_state_flag
@@ -1617,6 +1617,7 @@ static inline void ext4_clear_state_flag
EXT4_FEATURE_INCOMPAT_EXTENTS| \
EXT4_FEATURE_INCOMPAT_64BIT| \
EXT4_FEATURE_INCOMPAT_FLEX_BG| \
......@@ -16,7 +16,7 @@ Index: linux-stage/fs/ext4/ext4.h
EXT4_FEATURE_INCOMPAT_MMP | \
EXT4_FEATURE_INCOMPAT_DIRDATA| \
EXT4_FEATURE_INCOMPAT_INLINE_DATA)
@@ -1990,6 +1997,10 @@ struct mmpd_data {
@@ -2028,6 +2029,10 @@ struct mmpd_data {
# define ATTRIB_NORET __attribute__((noreturn))
# define NORET_AND noreturn,
......@@ -27,7 +27,7 @@ Index: linux-stage/fs/ext4/ext4.h
/* bitmap.c */
extern unsigned int ext4_count_free(char *bitmap, unsigned numchars);
void ext4_inode_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
@@ -2194,6 +2205,7 @@ extern void ext4_set_inode_flags(struct
@@ -2233,6 +2238,7 @@ extern void ext4_set_inode_flags(struct
extern void ext4_get_inode_flags(struct ext4_inode_info *);
extern int ext4_alloc_da_blocks(struct inode *inode);
extern void ext4_set_aops(struct inode *inode);
......@@ -39,7 +39,7 @@ Index: linux-stage/fs/ext4/inode.c
===================================================================
--- linux-stage.orig/fs/ext4/inode.c
+++ linux-stage/fs/ext4/inode.c
@@ -134,8 +134,6 @@ static void ext4_invalidatepage(struct p
@@ -136,8 +136,6 @@ static void ext4_invalidatepage(struct p
unsigned int length);
static int __ext4_journalled_writepage(struct page *page, unsigned int len);
static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh);
......@@ -48,7 +48,7 @@ Index: linux-stage/fs/ext4/inode.c
/*
* Test whether an inode is a fast symlink.
@@ -184,6 +182,8 @@ void ext4_evict_inode(struct inode *inod
@@ -186,6 +184,8 @@ void ext4_evict_inode(struct inode *inod
{
handle_t *handle;
int err;
......@@ -57,7 +57,7 @@ Index: linux-stage/fs/ext4/inode.c
trace_ext4_evict_inode(inode);
@@ -236,8 +236,8 @@ void ext4_evict_inode(struct inode *inod
@@ -235,8 +235,8 @@ void ext4_evict_inode(struct inode *inod
* protection against it
*/
sb_start_intwrite(inode->i_sb);
......@@ -68,7 +68,7 @@ Index: linux-stage/fs/ext4/inode.c
if (IS_ERR(handle)) {
ext4_std_error(inode->i_sb, PTR_ERR(handle));
/*
@@ -252,6 +252,32 @@ void ext4_evict_inode(struct inode *inod
@@ -251,6 +251,32 @@ void ext4_evict_inode(struct inode *inod
if (IS_SYNC(inode))
ext4_handle_sync(handle);
......@@ -101,7 +101,7 @@ Index: linux-stage/fs/ext4/inode.c
inode->i_size = 0;
err = ext4_mark_inode_dirty(handle, inode);
if (err) {
@@ -269,10 +296,10 @@ void ext4_evict_inode(struct inode *inod
@@ -267,10 +293,10 @@ void ext4_evict_inode(struct inode *inod
* enough credits left in the handle to remove the inode from
* the orphan list and set the dtime field.
*/
......@@ -115,7 +115,7 @@ Index: linux-stage/fs/ext4/inode.c
if (err != 0) {
ext4_warning(inode->i_sb,
"couldn't extend journal (err %d)", err);
@@ -308,6 +335,9 @@ void ext4_evict_inode(struct inode *inod
@@ -307,6 +333,9 @@ void ext4_evict_inode(struct inode *inod
ext4_free_inode(handle, inode);
ext4_journal_stop(handle);
sb_end_intwrite(inode->i_sb);
......@@ -125,7 +125,7 @@ Index: linux-stage/fs/ext4/inode.c
return;
no_delete:
ext4_clear_inode(inode); /* We must guarantee clearing of inode... */
@@ -4681,7 +4711,7 @@ static int ext4_index_trans_blocks(struc
@@ -5132,7 +5161,7 @@ static int ext4_index_trans_blocks(struc
*
* Also account for superblock, inode, quota and xattr blocks
*/
......@@ -1032,7 +1032,7 @@ Index: linux-stage/fs/ext4/xattr.h
#define BHDR(bh) ((struct ext4_xattr_header *)((bh)->b_data))
#define ENTRY(ptr) ((struct ext4_xattr_entry *)(ptr))
#define BFIRST(bh) ENTRY(BHDR(bh)+1)
@@ -75,10 +84,11 @@ struct ext4_xattr_entry {
@@ -75,10 +95,11 @@ struct ext4_xattr_entry {
#define EXT4_ZERO_XATTR_VALUE ((void *)-1)
struct ext4_xattr_info {
......@@ -1045,7 +1045,7 @@ Index: linux-stage/fs/ext4/xattr.h
};
struct ext4_xattr_search {
@@ -106,7 +116,13 @@ extern int ext4_xattr_get(struct inode *
@@ -106,7 +127,13 @@ extern int ext4_xattr_get(struct inode *
extern int ext4_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
extern int ext4_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
......@@ -1060,11 +1060,25 @@ Index: linux-stage/fs/ext4/xattr.h
extern void ext4_xattr_put_super(struct super_block *);
extern int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
Index: linux-stage/fs/ext4/extents.c
===================================================================
--- linux-stage.orig/fs/ext4/extents.c
+++ linux-stage/fs/ext4/extents.c
@@ -2461,7 +2461,8 @@ int ext4_ext_index_trans_blocks(struct i
static inline int get_default_free_blocks_flags(struct inode *inode)
{
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ ext4_test_inode_flag(inode, EXT4_INODE_EA_INODE))
return EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET;
else if (ext4_should_journal_data(inode))
return EXT4_FREE_BLOCKS_FORGET;
Index: linux-stage/fs/ext4/ialloc.c
===================================================================
--- linux-stage.orig/fs/ext4/ialloc.c
+++ linux-stage/fs/ext4/ialloc.c
@@ -269,7 +269,6 @@ void ext4_free_inode(handle_t *handle, s
@@ -247,7 +247,6 @@ void ext4_free_inode(handle_t *handle, s
* as writing the quota to disk may need the lock as well.
*/
dquot_initialize(inode);
......@@ -1072,6 +1086,20 @@ Index: linux-stage/fs/ext4/ialloc.c
dquot_free_inode(inode);
dquot_drop(inode);
Index: linux-stage/fs/ext4/indirect.c
===================================================================
--- linux-stage.orig/fs/ext4/indirect.c
+++ linux-stage/fs/ext4/indirect.c
@@ -959,7 +959,8 @@ static int ext4_clear_blocks(handle_t *h
int flags = EXT4_FREE_BLOCKS_VALIDATED;
int err;
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ ext4_test_inode_flag(inode, EXT4_INODE_EA_INODE))
flags |= EXT4_FREE_BLOCKS_FORGET | EXT4_FREE_BLOCKS_METADATA;
else if (ext4_should_journal_data(inode))
flags |= EXT4_FREE_BLOCKS_FORGET;
Index: linux-stage/fs/ext4/inline.c
===================================================================
--- linux-stage.orig/fs/ext4/inline.c
......
......@@ -8,7 +8,7 @@ Index: linux-stage/fs/ext4/ext4.h
===================================================================
--- linux-stage.orig/fs/ext4/ext4.h
+++ linux-stage/fs/ext4/ext4.h
@@ -1579,6 +1579,7 @@ static inline void ext4_clear_state_flag
@@ -1620,6 +1620,7 @@ static inline void ext4_clear_state_flag
EXT4_FEATURE_INCOMPAT_EXTENTS| \
EXT4_FEATURE_INCOMPAT_64BIT| \
EXT4_FEATURE_INCOMPAT_FLEX_BG| \
......@@ -16,7 +16,7 @@ Index: linux-stage/fs/ext4/ext4.h
EXT4_FEATURE_INCOMPAT_MMP | \
EXT4_FEATURE_INCOMPAT_DIRDATA| \
EXT4_FEATURE_INCOMPAT_INLINE_DATA)
@@ -1990,6 +1997,10 @@ struct mmpd_data {
@@ -2033,6 +2034,10 @@ struct mmpd_data {
# define ATTRIB_NORET __attribute__((noreturn))
# define NORET_AND noreturn,
......@@ -27,7 +27,7 @@ Index: linux-stage/fs/ext4/ext4.h
/* bitmap.c */
extern unsigned int ext4_count_free(char *bitmap, unsigned numchars);
void ext4_inode_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
@@ -2194,6 +2205,7 @@ extern void ext4_set_inode_flags(struct
@@ -2238,6 +2243,7 @@ extern void ext4_set_inode_flags(struct
extern void ext4_get_inode_flags(struct ext4_inode_info *);
extern int ext4_alloc_da_blocks(struct inode *inode);
extern void ext4_set_aops(struct inode *inode);
......@@ -39,7 +39,7 @@ Index: linux-stage/fs/ext4/inode.c
===================================================================
--- linux-stage.orig/fs/ext4/inode.c
+++ linux-stage/fs/ext4/inode.c
@@ -134,8 +134,6 @@ static void ext4_invalidatepage(struct p
@@ -136,8 +136,6 @@ static void ext4_invalidatepage(struct p
unsigned int length);
static int __ext4_journalled_writepage(struct page *page, unsigned int len);
static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh);
......@@ -48,7 +48,7 @@ Index: linux-stage/fs/ext4/inode.c
/*
* Test whether an inode is a fast symlink.
@@ -184,6 +182,8 @@ void ext4_evict_inode(struct inode *inod
@@ -186,6 +184,8 @@ void ext4_evict_inode(struct inode *inod
{
handle_t *handle;
int err;
......@@ -57,7 +57,7 @@ Index: linux-stage/fs/ext4/inode.c
trace_ext4_evict_inode(inode);
@@ -236,8 +236,8 @@ void ext4_evict_inode(struct inode *inod
@@ -235,8 +235,8 @@ void ext4_evict_inode(struct inode *inod
* protection against it
*/
sb_start_intwrite(inode->i_sb);
......@@ -68,7 +68,7 @@ Index: linux-stage/fs/ext4/inode.c
if (IS_ERR(handle)) {
ext4_std_error(inode->i_sb, PTR_ERR(handle));
/*
@@ -252,6 +252,32 @@ void ext4_evict_inode(struct inode *inod
@@ -251,6 +251,32 @@ void ext4_evict_inode(struct inode *inod
if (IS_SYNC(inode))
ext4_handle_sync(handle);
......@@ -101,7 +101,7 @@ Index: linux-stage/fs/ext4/inode.c
inode->i_size = 0;
err = ext4_mark_inode_dirty(handle, inode);
if (err) {
@@ -269,10 +296,10 @@ void ext4_evict_inode(struct inode *inod
@@ -267,10 +293,10 @@ void ext4_evict_inode(struct inode *inod
* enough credits left in the handle to remove the inode from
* the orphan list and set the dtime field.
*/
......@@ -115,7 +115,7 @@ Index: linux-stage/fs/ext4/inode.c
if (err != 0) {
ext4_warning(inode->i_sb,
"couldn't extend journal (err %d)", err);
@@ -308,6 +335,9 @@ void ext4_evict_inode(struct inode *inod
@@ -307,6 +333,9 @@ void ext4_evict_inode(struct inode *inod
ext4_free_inode(handle, inode);
ext4_journal_stop(handle);
sb_end_intwrite(inode->i_sb);
......@@ -125,7 +125,7 @@ Index: linux-stage/fs/ext4/inode.c
return;
no_delete:
ext4_clear_inode(inode); /* We must guarantee clearing of inode... */
@@ -4681,7 +4711,7 @@ static int ext4_index_trans_blocks(struc
@@ -5140,7 +5169,7 @@ static int ext4_index_trans_blocks(struc
*
* Also account for superblock, inode, quota and xattr blocks
*/
......@@ -1055,7 +1055,7 @@ Index: linux-stage/fs/ext4/xattr.h
#define BHDR(bh) ((struct ext4_xattr_header *)((bh)->b_data))
#define ENTRY(ptr) ((struct ext4_xattr_entry *)(ptr))
#define BFIRST(bh) ENTRY(BHDR(bh)+1)
@@ -75,10 +84,11 @@ struct ext4_xattr_entry {
@@ -75,10 +95,11 @@ struct ext4_xattr_entry {
#define EXT4_ZERO_XATTR_VALUE ((void *)-1)
struct ext4_xattr_info {
......@@ -1068,7 +1068,7 @@ Index: linux-stage/fs/ext4/xattr.h
};
struct ext4_xattr_search {
@@ -106,7 +116,13 @@ extern int ext4_xattr_get(struct inode *
@@ -106,7 +127,13 @@ extern int ext4_xattr_get(struct inode *
extern int ext4_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
extern int ext4_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
......@@ -1083,11 +1083,25 @@ Index: linux-stage/fs/ext4/xattr.h
extern void ext4_xattr_put_super(struct super_block *);
extern int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
Index: linux-stage/fs/ext4/extents.c
===================================================================
--- linux-stage.orig/fs/ext4/extents.c
+++ linux-stage/fs/ext4/extents.c
@@ -2474,7 +2474,8 @@ int ext4_ext_index_trans_blocks(struct i
static inline int get_default_free_blocks_flags(struct inode *inode)
{
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ ext4_test_inode_flag(inode, EXT4_INODE_EA_INODE))
return EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET;
else if (ext4_should_journal_data(inode))
return EXT4_FREE_BLOCKS_FORGET;
Index: linux-stage/fs/ext4/ialloc.c
===================================================================
--- linux-stage.orig/fs/ext4/ialloc.c
+++ linux-stage/fs/ext4/ialloc.c
@@ -269,7 +269,6 @@ void ext4_free_inode(handle_t *handle, s
@@ -247,7 +247,6 @@ void ext4_free_inode(handle_t *handle, s
* as writing the quota to disk may need the lock as well.
*/
dquot_initialize(inode);
......@@ -1095,6 +1109,20 @@ Index: linux-stage/fs/ext4/ialloc.c
dquot_free_inode(inode);
dquot_drop(inode);
Index: linux-stage/fs/ext4/indirect.c
===================================================================
--- linux-stage.orig/fs/ext4/indirect.c
+++ linux-stage/fs/ext4/indirect.c
@@ -967,7 +967,8 @@ static int ext4_clear_blocks(handle_t *h
int flags = EXT4_FREE_BLOCKS_VALIDATED;
int err;
- if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
+ if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
+ ext4_test_inode_flag(inode, EXT4_INODE_EA_INODE))
flags |= EXT4_FREE_BLOCKS_FORGET | EXT4_FREE_BLOCKS_METADATA;
else if (ext4_should_journal_data(inode))
flags |= EXT4_FREE_BLOCKS_FORGET;
Index: linux-stage/fs/ext4/inline.c
===================================================================
--- linux-stage.orig/fs/ext4/inline.c
......
This diff is collapsed.
......@@ -1070,6 +1070,20 @@ Index: linux-stage/fs/ext4/xattr.h
extern void ext4_xattr_put_super(struct super_block *);