diff options
author | Matthew Wilcox <willy@linux.intel.com> | 2008-05-19 02:34:27 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:12 -0400 |
commit | d748c62367eb630cc30b91d561a5362f597a0892 (patch) | |
tree | 551fc30d6237517822edc6729456349e1bd0ab28 /fs/xfs/xfs_log_priv.h | |
parent | d729eae8933cb3eb8edf1446532c178b66b293a9 (diff) |
[XFS] Convert l_flushsema to a sv_t
The l_flushsema doesn't exactly have completion semantics, nor mutex
semantics. It's used as a list of tasks which are waiting to be notified
that a flush has completed. It was also being used in a way that was
potentially racy, depending on the semaphore implementation.
By using a sv_t instead of a semaphore we avoid the need for a separate
counter, since we know we just need to wake everything on the queue.
Original waitqueue implementation from Matthew Wilcox. Cleanup and
conversion to sv_t by Christoph Hellwig.
SGI-PV: 981507
SGI-Modid: xfs-linux-melb:xfs-kern:31059a
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r-- | fs/xfs/xfs_log_priv.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 8952a392b5f3..6245913196b4 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
@@ -423,10 +423,8 @@ typedef struct log { | |||
423 | int l_logBBsize; /* size of log in BB chunks */ | 423 | int l_logBBsize; /* size of log in BB chunks */ |
424 | 424 | ||
425 | /* The following block of fields are changed while holding icloglock */ | 425 | /* The following block of fields are changed while holding icloglock */ |
426 | sema_t l_flushsema ____cacheline_aligned_in_smp; | 426 | sv_t l_flush_wait ____cacheline_aligned_in_smp; |
427 | /* iclog flushing semaphore */ | 427 | /* waiting for iclog flush */ |
428 | int l_flushcnt; /* # of procs waiting on this | ||
429 | * sema */ | ||
430 | int l_covered_state;/* state of "covering disk | 428 | int l_covered_state;/* state of "covering disk |
431 | * log entries" */ | 429 | * log entries" */ |
432 | xlog_in_core_t *l_iclog; /* head log queue */ | 430 | xlog_in_core_t *l_iclog; /* head log queue */ |