#include <trace/events/ext4.h>
static struct kmem_cache *ext4_fc_dentry_cachep;
+ static struct kmem_cache *ext4_fc_range_cachep;
+
+ /*
+ * Avoid spending unbounded time/memory snapshotting highly fragmented files
+ * under jbd2_journal_lock_updates(). If we exceed this limit, fall back to
+ * full commit.
+ */
+ #define EXT4_FC_SNAPSHOT_MAX_INODES 1024
+ #define EXT4_FC_SNAPSHOT_MAX_RANGES 2048
+
+ static inline void ext4_fc_set_snap_err(int *snap_err, int err)
+ {
+ if (snap_err && *snap_err == EXT4_FC_SNAP_ERR_NONE)
+ *snap_err = err;
+ }
-static void ext4_end_buffer_io_sync(struct buffer_head *bh, int uptodate)
+static void ext4_end_buffer_io_sync(struct bio *bio)
{
+ struct buffer_head *bh;
+ bool uptodate = bio_endio_bh(bio, &bh);
+
BUFFER_TRACE(bh, "");
if (uptodate) {
ext4_debug("%s: Block %lld up-to-date",