diff options
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r-- | fs/ocfs2/ocfs2.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 648ef8e45eaa..5cc90a40b3c5 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -306,6 +306,19 @@ static inline int ocfs2_sparse_alloc(struct ocfs2_super *osb) | |||
306 | return 0; | 306 | return 0; |
307 | } | 307 | } |
308 | 308 | ||
309 | static inline int ocfs2_writes_unwritten_extents(struct ocfs2_super *osb) | ||
310 | { | ||
311 | /* | ||
312 | * Support for sparse files is a pre-requisite | ||
313 | */ | ||
314 | if (!ocfs2_sparse_alloc(osb)) | ||
315 | return 0; | ||
316 | |||
317 | if (osb->s_feature_ro_compat & OCFS2_FEATURE_RO_COMPAT_UNWRITTEN) | ||
318 | return 1; | ||
319 | return 0; | ||
320 | } | ||
321 | |||
309 | /* set / clear functions because cluster events can make these happen | 322 | /* set / clear functions because cluster events can make these happen |
310 | * in parallel so we want the transitions to be atomic. this also | 323 | * in parallel so we want the transitions to be atomic. this also |
311 | * means that any future flags osb_flags must be protected by spinlock | 324 | * means that any future flags osb_flags must be protected by spinlock |