diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/storage/mmap_v1/extent.h | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/storage/mmap_v1/extent.h')
-rw-r--r-- | src/mongo/db/storage/mmap_v1/extent.h | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/src/mongo/db/storage/mmap_v1/extent.h b/src/mongo/db/storage/mmap_v1/extent.h index a25d34c49e0..9d6d3935346 100644 --- a/src/mongo/db/storage/mmap_v1/extent.h +++ b/src/mongo/db/storage/mmap_v1/extent.h @@ -39,45 +39,50 @@ namespace mongo { - /* extents are datafile regions where all the records within the region - belong to the same namespace. +/* extents are datafile regions where all the records within the region + belong to the same namespace. - (11:12:35 AM) dm10gen: when the extent is allocated, all its empty space is stuck into one big DeletedRecord - (11:12:55 AM) dm10gen: and that is placed on the free list - */ +(11:12:35 AM) dm10gen: when the extent is allocated, all its empty space is stuck into one big DeletedRecord +(11:12:55 AM) dm10gen: and that is placed on the free list +*/ #pragma pack(1) - struct Extent { - enum { extentSignature = 0x41424344 }; - unsigned magic; - DiskLoc myLoc; +struct Extent { + enum { extentSignature = 0x41424344 }; + unsigned magic; + DiskLoc myLoc; - /* next/prev extent for this namespace */ - DiskLoc xnext; - DiskLoc xprev; + /* next/prev extent for this namespace */ + DiskLoc xnext; + DiskLoc xprev; - /* which namespace this extent is for. this is just for troubleshooting really - and won't even be correct if the collection were renamed! - */ - Namespace nsDiagnostic; + /* which namespace this extent is for. this is just for troubleshooting really + and won't even be correct if the collection were renamed! + */ + Namespace nsDiagnostic; - int length; /* size of the extent, including these fields */ - DiskLoc firstRecord; - DiskLoc lastRecord; - char _extentData[4]; + int length; /* size of the extent, including these fields */ + DiskLoc firstRecord; + DiskLoc lastRecord; + char _extentData[4]; - // ----- + // ----- - bool validates(const DiskLoc diskLoc, std::vector<std::string>* errors = NULL) const; + bool validates(const DiskLoc diskLoc, std::vector<std::string>* errors = NULL) const; - BSONObj dump() const; + BSONObj dump() const; - void dump(std::iostream& s) const; + void dump(std::iostream& s) const; - bool isOk() const { return magic == extentSignature; } - void assertOk() const { verify(isOk()); } + bool isOk() const { + return magic == extentSignature; + } + void assertOk() const { + verify(isOk()); + } - static int HeaderSize() { return sizeof(Extent)-4; } - }; + static int HeaderSize() { + return sizeof(Extent) - 4; + } +}; #pragma pack() - } |