summaryrefslogtreecommitdiff
path: root/db/pdfile.h
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2010-09-29 10:18:11 -0400
committerDwight <dwight@10gen.com>2010-09-29 10:18:11 -0400
commit7edb8c3f659e278f58a115f0753c90e9b08b7919 (patch)
tree9ad1594028263b9f35a72cf348fecb54259e4b67 /db/pdfile.h
parenta0e977c8c1b86346c0d570beb806417a298cf528 (diff)
downloadmongo-7edb8c3f659e278f58a115f0753c90e9b08b7919.tar.gz
intent to write
Diffstat (limited to 'db/pdfile.h')
-rw-r--r--db/pdfile.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/db/pdfile.h b/db/pdfile.h
index 78af6711e0e..900a1259783 100644
--- a/db/pdfile.h
+++ b/db/pdfile.h
@@ -191,6 +191,12 @@ namespace mongo {
/* get the next record in the namespace, traversing extents as necessary */
DiskLoc getNext(const DiskLoc& myLoc);
DiskLoc getPrev(const DiskLoc& myLoc);
+
+ struct NP {
+ int nextOfs;
+ int prevOfs;
+ };
+ NP* np() { return (NP*) &nextOfs; }
};
/* extents are datafile regions where all the records within the region
@@ -211,7 +217,8 @@ namespace mongo {
Namespace nsDiagnostic;
int length; /* size of the extent, including these fields */
- DiskLoc firstRecord, lastRecord;
+ DiskLoc firstRecord;
+ DiskLoc lastRecord;
char _extentData[4];
static int HeaderSize() { return sizeof(Extent)-4; }
@@ -252,6 +259,12 @@ namespace mongo {
Extent* getPrevExtent() { return xprev.isNull() ? 0 : DataFileMgr::getExtent(xprev); }
static int maxSize();
+
+ struct FL {
+ DiskLoc firstRecord;
+ DiskLoc lastRecord;
+ };
+ FL* fl() { return (FL*) &firstRecord; }
private:
DiskLoc _reuse(const char *nsname);
};