mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
Linux: 2.6.32 - Adapt to writeback changes
Adapt to the writeback changes in kernel 2.6.32 - Since we define our own backing_dev, it needs to be registered with the writeback code and attached to the super_block. Otherwise it might get ignored when writeback is needed. - Each backing_dev now gets its own kernel thread. The name of the thread is based on the registered name - the openafs one will appear as "flush-afs". Reviewed-on: http://gerrit.openafs.org/574 Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
fa8766d220
commit
db23268f68
@ -904,6 +904,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
||||
LINUX_DEFINES_FOR_EACH_PROCESS
|
||||
LINUX_DEFINES_PREV_TASK
|
||||
LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE
|
||||
LINUX_STRUCT_SUPER_BLOCK_HAS_S_BDI
|
||||
LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
|
||||
LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
|
||||
LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM
|
||||
|
@ -108,6 +108,11 @@ afs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
#if defined(HAVE_BDI_INIT)
|
||||
bdi_init(&afs_backing_dev_info);
|
||||
#endif
|
||||
#if defined (STRUCT_SUPER_BLOCK_HAS_S_BDI)
|
||||
sb->s_bdi = &afs_backing_dev_info;
|
||||
/* The name specified here will appear in the flushing thread name - flush-afs */
|
||||
bdi_register(&afs_backing_dev_info, NULL, "afs");
|
||||
#endif
|
||||
#if !defined(AFS_NONFSTRANS)
|
||||
sb->s_export_op = &afs_export_ops;
|
||||
#endif
|
||||
|
@ -1289,3 +1289,18 @@ AC_DEFUN([LINUX_KEYS_HAVE_SESSION_TO_PARENT], [
|
||||
if test "x$ac_cv_linux_have_session_to_parent" = "xyes"; then
|
||||
AC_DEFINE([HAVE_SESSION_TO_PARENT], 1, [define if keyctl has the KEYCTL_SESSION_TO_PARENT function])
|
||||
fi])
|
||||
|
||||
AC_DEFUN([LINUX_STRUCT_SUPER_BLOCK_HAS_S_BDI], [
|
||||
AC_MSG_CHECKING([if struct super_block has s_bdi])
|
||||
AC_CACHE_VAL([ac_cv_linux_struct_super_block_has_s_bdi], [
|
||||
AC_TRY_KBUILD(
|
||||
[#include <linux/fs.h>],
|
||||
[struct super_block _sb;
|
||||
_sb.s_bdi= NULL;],
|
||||
ac_cv_linux_struct_super_block_has_s_bdi=yes,
|
||||
ac_cv_linux_struct_super_block_has_s_bdi=no)])
|
||||
AC_MSG_RESULT($ac_cv_linux_struct_super_block_has_s_bdi)
|
||||
if test "x$ac_cv_linux_struct_super_block_has_s_bdi" = "xyes"; then
|
||||
AC_DEFINE([STRUCT_SUPER_BLOCK_HAS_S_BDI], 1, [define if struct super_block has an s_bdi member])
|
||||
fi])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user