1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * Lustre Metadata Server (mds) journal abstraction routines
8 * Copyright (C) 2002 Cluster File Systems, Inc.
9 * author: Andreas Dilger <adilger@clusterfs.com>
11 * This code is issued under the GNU General Public License.
12 * See the file COPYING in this distribution
16 #define DEBUG_SUBSYSTEM S_MDS
19 #include <linux/jbd.h>
20 #include <linux/ext3_fs.h>
21 #include <linux/ext3_jbd.h>
22 #include <linux/lustre_mds.h>
25 * We don't currently need any additional blocks for rmdir and
26 * unlink transactions because we are storing the OST oa_id inside
27 * the inode (which we will be changing anyways as part of this
28 * transaction). When we store the oa_id in an EA (which may be
29 * in an external block) we need to increase nblocks by 1.
31 static void *mds_ext3_start(struct inode *inode, int op)
37 case MDS_JOP_UNLINK: nblocks = EXT3_DELETE_TRANS_BLOCKS; break;
40 return journal_start(EXT3_JOURNAL(inode), nblocks);
43 static int mds_ext3_stop(void *handle, struct inode *inode)
45 return journal_stop((handle_t *)handle);
48 struct mds_journal_operations mds_ext3_journal_ops = {
49 tr_start: mds_ext3_start,
50 tr_commit: mds_ext3_stop,