xfs_defer.c (7b3ec2b20e44f579c022ad62243aa18c04c6addc) | xfs_defer.c (fd920008784ead369e79c2be2f8d9cc736e306ca) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Copyright (C) 2016 Oracle. All Rights Reserved. 4 * Author: Darrick J. Wong <darrick.wong@oracle.com> 5 */ 6#include "xfs.h" 7#include "xfs_fs.h" 8#include "xfs_shared.h" --- 9 unchanged lines hidden (view full) --- 18#include "xfs_trace.h" 19#include "xfs_icache.h" 20#include "xfs_log.h" 21#include "xfs_rmap.h" 22#include "xfs_refcount.h" 23#include "xfs_bmap.h" 24#include "xfs_alloc.h" 25#include "xfs_buf.h" | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Copyright (C) 2016 Oracle. All Rights Reserved. 4 * Author: Darrick J. Wong <darrick.wong@oracle.com> 5 */ 6#include "xfs.h" 7#include "xfs_fs.h" 8#include "xfs_shared.h" --- 9 unchanged lines hidden (view full) --- 18#include "xfs_trace.h" 19#include "xfs_icache.h" 20#include "xfs_log.h" 21#include "xfs_rmap.h" 22#include "xfs_refcount.h" 23#include "xfs_bmap.h" 24#include "xfs_alloc.h" 25#include "xfs_buf.h" |
26#include "xfs_attr.h" |
|
26 27static struct kmem_cache *xfs_defer_pending_cache; 28 29/* 30 * Deferred Operations in XFS 31 * 32 * Due to the way locking rules work in XFS, certain transactions (block 33 * mapping and unmapping, typically) have permanent reservations so that --- 830 unchanged lines hidden (view full) --- 864 if (error) 865 goto err; 866 error = xfs_bmap_intent_init_cache(); 867 if (error) 868 goto err; 869 error = xfs_extfree_intent_init_cache(); 870 if (error) 871 goto err; | 27 28static struct kmem_cache *xfs_defer_pending_cache; 29 30/* 31 * Deferred Operations in XFS 32 * 33 * Due to the way locking rules work in XFS, certain transactions (block 34 * mapping and unmapping, typically) have permanent reservations so that --- 830 unchanged lines hidden (view full) --- 865 if (error) 866 goto err; 867 error = xfs_bmap_intent_init_cache(); 868 if (error) 869 goto err; 870 error = xfs_extfree_intent_init_cache(); 871 if (error) 872 goto err; |
872 | 873 error = xfs_attri_init_cache(); 874 if (error) 875 goto err; 876 error = xfs_attrd_init_cache(); 877 if (error) 878 goto err; |
873 return 0; 874err: 875 xfs_defer_destroy_item_caches(); 876 return error; 877} 878 879/* Destroy all the deferred work item caches, if they've been allocated. */ 880void 881xfs_defer_destroy_item_caches(void) 882{ | 879 return 0; 880err: 881 xfs_defer_destroy_item_caches(); 882 return error; 883} 884 885/* Destroy all the deferred work item caches, if they've been allocated. */ 886void 887xfs_defer_destroy_item_caches(void) 888{ |
889 xfs_attri_destroy_cache(); 890 xfs_attrd_destroy_cache(); |
|
883 xfs_extfree_intent_destroy_cache(); 884 xfs_bmap_intent_destroy_cache(); 885 xfs_refcount_intent_destroy_cache(); 886 xfs_rmap_intent_destroy_cache(); 887 xfs_defer_destroy_cache(); 888} | 891 xfs_extfree_intent_destroy_cache(); 892 xfs_bmap_intent_destroy_cache(); 893 xfs_refcount_intent_destroy_cache(); 894 xfs_rmap_intent_destroy_cache(); 895 xfs_defer_destroy_cache(); 896} |