-
Bruno Faccini authored
Creating a kthread can't occur during a journal transaction is being filled because otherwise a deadlock can happen if memory reclaim is triggered by kthreadd when forking the new thread, and thus I/Os could be attempted to the same device from shrinkers requiring a new journal transaction to be started when current could never complete. Thus this patch moves kthread_run() of gc_task in mdd_trans_stop(). Comment in mdd_changelog_max_idle_time_seq_write() as been updated to reflect the need to limit the value to about 68 years, to allow to keep with 32 bits operands for comparison, As it will go away with recent kernels, get_seconds() usage has been replaced by calling ktime_get_real_seconds() for user idle time initialization and comparison. Also, enable Changelog GC, as it is no longer the default, in sanity/test_160f sub-test and remove it from ALWAYS_EXCEPT to reenable it, leaving 160g for LU-10734 reason now. And in addition, changes in sanity/test_160f have been added to make it fully DNE-compatible. With this patch, GC-thread can be stopped upon MDT umount, and remaining orphan ChangeLog records clean-up will occur upon next restart. New sanity/test_160h sub-test checks this scenario. Signed-off-by:
Bruno Faccini <bruno.faccini@intel.com> Change-Id: I7ec076bc04594b230c57348d7ac92acc58c258e1 Reviewed-on: https://review.whamcloud.com/31376 Tested-by: Jenkins Tested-by:
Maloo <hpdd-maloo@intel.com> Reviewed-by:
Andreas Dilger <andreas.dilger@intel.com> Reviewed-by:
Fan Yong <fan.yong@intel.com> Reviewed-by:
Oleg Drokin <oleg.drokin@intel.com>
Bruno Faccini authoredCreating a kthread can't occur during a journal transaction is being filled because otherwise a deadlock can happen if memory reclaim is triggered by kthreadd when forking the new thread, and thus I/Os could be attempted to the same device from shrinkers requiring a new journal transaction to be started when current could never complete. Thus this patch moves kthread_run() of gc_task in mdd_trans_stop(). Comment in mdd_changelog_max_idle_time_seq_write() as been updated to reflect the need to limit the value to about 68 years, to allow to keep with 32 bits operands for comparison, As it will go away with recent kernels, get_seconds() usage has been replaced by calling ktime_get_real_seconds() for user idle time initialization and comparison. Also, enable Changelog GC, as it is no longer the default, in sanity/test_160f sub-test and remove it from ALWAYS_EXCEPT to reenable it, leaving 160g for LU-10734 reason now. And in addition, changes in sanity/test_160f have been added to make it fully DNE-compatible. With this patch, GC-thread can be stopped upon MDT umount, and remaining orphan ChangeLog records clean-up will occur upon next restart. New sanity/test_160h sub-test checks this scenario. Signed-off-by:
Bruno Faccini <bruno.faccini@intel.com> Change-Id: I7ec076bc04594b230c57348d7ac92acc58c258e1 Reviewed-on: https://review.whamcloud.com/31376 Tested-by: Jenkins Tested-by:
Maloo <hpdd-maloo@intel.com> Reviewed-by:
Andreas Dilger <andreas.dilger@intel.com> Reviewed-by:
Fan Yong <fan.yong@intel.com> Reviewed-by:
Oleg Drokin <oleg.drokin@intel.com>
mdd_device.c 53.27 KiB