(void)f;
],[
AC_DEFINE(HAVE_LDISKFSFS_GETHASH_INODE_ARG, 1,
- [if ldiskfsfs_dirhash takes an inode argument])
+ [ldiskfsfs_dirhash takes an inode argument])
])
EXTRA_KCFLAGS="$tmp_flags"
]) # LB_LDISKFSFS_DIRHASH_WANTS_DIR
#
+# LB_JBD2_H_TOTAL_CREDITS
+#
+# kernel 5.5 commit 933f1c1e0b75bbc29730eef07c9e196c6dfd37e5
+# jbd2: Reserve space for revoke descriptor blocks
+#
+AC_DEFUN([LB_JBD2_H_TOTAL_CREDITS], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_CHECK_COMPILE([if struct jbd2_journal_handle has h_total_credits member],
+handle_t_h_revoke_credits, [
+ #include <linux/jbd2.h>
+],[
+ int x = offsetof(struct jbd2_journal_handle, h_total_credits);
+ (void)x;
+],[
+ AC_DEFINE(HAVE_JOURNAL_TOTAL_CREDITS, 1,
+ [struct jbd2_journal_handle has h_total_credits member])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+]) # LB_JBD2_H_TOTAL_CREDITS
+
+#
# LB_CONFIG_LDISKFS
#
AC_DEFUN([LB_CONFIG_LDISKFS], [
LB_LDISKFS_IGET_HAS_FLAGS_ARG
LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS
LB_LDISKFSFS_DIRHASH_WANTS_DIR
+ LB_JBD2_H_TOTAL_CREDITS
AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [posix acls for ldiskfs])
AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [fs security for ldiskfs])
AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [extened attributes for ldiskfs])
# When inode times are timespec64 stop using the deprecated
# time interfaces.
#
+# kernel v5.5-rc1-6-gba70609d5ec6 ba70609d5ec664a8f36ba1c857fcd97a478adf79
+# fs: Delete timespec64_trunc()
+#
AC_DEFUN([LC_INODE_TIMESPEC64], [
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Werror"
#include <linux/fs.h>
],[
struct inode *inode = NULL;
- struct timespec64 ts = {};
+ struct timespec64 ts = {0, 1};
- inode->i_atime = timespec64_trunc(ts, 1);
+ inode->i_atime = ts;
(void)inode;
],[
AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
#ifdef HAVE_INODE_TIMESPEC64
# define osd_timespec timespec64
-# define osd_timespec_trunc(ts, gran) timespec64_trunc((ts), (gran))
#else
# define osd_timespec timespec
-# define osd_timespec_trunc(ts, gran) timespec_trunc((ts), (gran))
#endif
static inline struct osd_timespec osd_inode_time(struct inode *inode,
{
struct osd_timespec ts = { .tv_sec = seconds };
- return osd_timespec_trunc(ts, inode->i_sb->s_time_gran);
+ return ts;
}
#define OSD_INS_CACHE_SIZE 8
oh->ot_credits += credits;
}
+/* linux: v5.4-rc3-21-g933f1c1e0b75 renamed h_buffer_credits */
+#ifdef HAVE_JOURNAL_TOTAL_CREDITS
+#define h_buffer_credits h_total_credits
+#endif
+
static inline void osd_trans_exec_op(const struct lu_env *env,
struct thandle *th,
enum osd_op_type op)