summaryrefslogtreecommitdiff
path: root/include/linux/gfs2_ondisk.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-06-14 23:32:57 +0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-06-14 23:32:57 +0400
commitfeaa7bba026c181ce071d5a4884f7f9dd26207a1 (patch)
treec858deb225917265cb07820730e9764674d133e8 /include/linux/gfs2_ondisk.h
parent22da645fd6675b7abc55cf937ddf6132f343e5b9 (diff)
downloadlinux-feaa7bba026c181ce071d5a4884f7f9dd26207a1.tar.xz
[GFS2] Fix unlinked file handling
This patch fixes the way we have been dealing with unlinked, but still open files. It removes all limits (other than memory for inodes, as per every other filesystem) on numbers of these which we can support on GFS2. It also means that (like other fs) its the responsibility of the last process to close the file to deallocate the storage, rather than the person who did the unlinking. Note that with GFS2, those two events might take place on different nodes. Also there are a number of other changes: o We use the Linux inode subsystem as it was intended to be used, wrt allocating GFS2 inodes o The Linux inode cache is now the point which we use for local enforcement of only holding one copy of the inode in core at once (previous to this we used the glock layer). o We no longer use the unlinked "special" file. We just ignore it completely. This makes unlinking more efficient. o We now use the 4th block allocation state. The previously unused state is used to track unlinked but still open inodes. o gfs2_inoded is no longer needed o Several fields are now no longer needed (and removed) from the in core struct gfs2_inode o Several fields are no longer needed (and removed) from the in core superblock There are a number of future possible optimisations and clean ups which have been made possible by this patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'include/linux/gfs2_ondisk.h')
-rw-r--r--include/linux/gfs2_ondisk.h34
1 files changed, 8 insertions, 26 deletions
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h
index 3893aac4e3ae..1181da831939 100644
--- a/include/linux/gfs2_ondisk.h
+++ b/include/linux/gfs2_ondisk.h
@@ -1,11 +1,11 @@
/*
-* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
-* Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
-*
-* This copyrighted material is made available to anyone wishing to use,
-* modify, copy, or redistribute it subject to the terms and conditions
-* of the GNU General Public License v.2.
-*/
+ * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
+ * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
#ifndef __GFS2_ONDISK_DOT_H__
#define __GFS2_ONDISK_DOT_H__
@@ -36,7 +36,6 @@
#define GFS2_FORMAT_LB 1000
#define GFS2_FORMAT_EA 1600
#define GFS2_FORMAT_ED 1700
-#define GFS2_FORMAT_UT 1300
#define GFS2_FORMAT_QC 1400
/* These are format numbers for entities contained in files */
#define GFS2_FORMAT_RI 1100
@@ -80,7 +79,6 @@ static inline int gfs2_inum_equal(const struct gfs2_inum *ino1,
#define GFS2_METATYPE_LB 12
#define GFS2_METATYPE_EA 10
#define GFS2_METATYPE_ED 11
-#define GFS2_METATYPE_UT 13
#define GFS2_METATYPE_QC 14
struct gfs2_meta_header {
@@ -158,7 +156,7 @@ struct gfs2_rindex {
#define GFS2_BLKST_FREE 0
#define GFS2_BLKST_USED 1
-#define GFS2_BLKST_INVALID 2
+#define GFS2_BLKST_UNLINKED 2
#define GFS2_BLKST_DINODE 3
#define GFS2_RGF_JOURNAL 0x00000001
@@ -397,20 +395,6 @@ struct gfs2_statfs_change {
};
/*
- * Unlinked Tag
- * Describes an allocated inode that isn't linked into
- * the directory tree and might need to be deallocated.
- */
-
-#define GFS2_UTF_UNINIT 0x00000001
-
-struct gfs2_unlinked_tag {
- struct gfs2_inum ut_inum;
- __be32 ut_flags; /* GFS2_UTF_... */
- __u32 __pad;
-};
-
-/*
* Quota change
* Describes an allocation change for a particular
* user or group.
@@ -445,8 +429,6 @@ extern void gfs2_inum_range_in(struct gfs2_inum_range *ir, char *buf);
extern void gfs2_inum_range_out(struct gfs2_inum_range *ir, char *buf);
extern void gfs2_statfs_change_in(struct gfs2_statfs_change *sc, char *buf);
extern void gfs2_statfs_change_out(struct gfs2_statfs_change *sc, char *buf);
-extern void gfs2_unlinked_tag_in(struct gfs2_unlinked_tag *ut, char *buf);
-extern void gfs2_unlinked_tag_out(struct gfs2_unlinked_tag *ut, char *buf);
extern void gfs2_quota_change_in(struct gfs2_quota_change *qc, char *buf);
/* Printing functions */