hrev44988 adds 2 changesets to branch 'master' old head: a6f39df3f76c9b7b5d851803c6644c24c673c051 new head: 5644d283b63aa82f578848dd04eaf1f27cb4c060 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=5644d28+%5Ea6f39df ---------------------------------------------------------------------------- 46cf7a5: Fix typos: super block -> superblock (#8974) Signed-off-by: Przemysław Buczkowski <przemub@xxxxxxxx> Signed-off-by: Matt Madia <mattmadia@xxxxxxxxx> [ Przemysław Buczkowski <przemub@xxxxxxxx> ] 5644d28: Manually applied: Fix typos: super block -> superblock (#8974) by: Przemysław Buczkowski <przemub@xxxxxxxx> [ Matt Madia <mattmadia@xxxxxxxxx> ] ---------------------------------------------------------------------------- 39 files changed, 183 insertions(+), 183 deletions(-) .../kernel/boot/boot_process_specs_x86.html | 4 +- .../kernel/file_systems/bfs/BlockAllocator.cpp | 4 +- src/add-ons/kernel/file_systems/bfs/Inode.cpp | 2 +- src/add-ons/kernel/file_systems/bfs/Journal.cpp | 10 +-- src/add-ons/kernel/file_systems/bfs/Volume.cpp | 14 ++-- src/add-ons/kernel/file_systems/btrfs/Volume.cpp | 6 +- src/add-ons/kernel/file_systems/exfat/Volume.cpp | 6 +- src/add-ons/kernel/file_systems/ext2/Journal.cpp | 72 ++++++++++---------- src/add-ons/kernel/file_systems/ext2/Volume.cpp | 8 +-- .../kernel/file_systems/reiserfs/SuperBlock.cpp | 8 +-- .../kernel/file_systems/reiserfs/Volume.cpp | 10 +-- .../kernel/file_systems/reiserfs/reiserfs.h | 4 +- .../kernel/file_systems/userlandfs/userlandfs | 2 +- src/bin/bfs_tools/bfsinfo.cpp | 4 +- src/bin/bfs_tools/bfswhich.cpp | 4 +- src/bin/bfs_tools/chkindex.cpp | 24 +++---- src/bin/bfs_tools/lib/Disk.cpp | 12 ++-- src/bin/bfs_tools/lib/Disk.h | 2 +- src/bin/bfs_tools/recover.cpp | 10 +-- src/bin/coreutils/man/sync.1 | 2 +- src/bin/coreutils/src/sync.c | 4 +- src/system/boot/loader/file_systems/bfs/bfs.cpp | 2 +- src/system/boot/platform/atari_m68k/devices.cpp | 2 +- src/system/boot/platform/bios_ia32/devices.cpp | 2 +- src/system/boot/platform/bios_ia32/stage1.S | 4 +- .../file_systems/bfs/dump_log/dump_log.cpp | 6 +- .../file_systems/bfs/fragmenter/fragmenter.cpp | 18 ++--- .../file_systems/bfs/r5/BlockAllocator.cpp | 2 +- .../add-ons/kernel/file_systems/bfs/r5/Inode.cpp | 2 +- .../kernel/file_systems/bfs/r5/Journal.cpp | 6 +- .../add-ons/kernel/file_systems/bfs/r5/ToDo | 2 +- .../kernel/file_systems/bfs/r5/Volume.cpp | 40 +++++------ .../add-ons/kernel/file_systems/fs_shell/mount.c | 40 +++++------ .../r5/src/test/reiserfs/SuperBlock.cpp | 8 +-- .../userlandfs/r5/src/test/reiserfs/Volume.cpp | 8 +-- .../userlandfs/r5/src/test/reiserfs/reiserfs.h | 4 +- .../file_systems/userlandfs/r5/userlandfs.sample | 2 +- .../kernel/file_corruption/fs/BlockAllocator.cpp | 2 +- .../system/kernel/file_corruption/fs/Volume.cpp | 4 +- ############################################################################ Commit: 46cf7a5a73679c6e4fde91710e4a4885242e49d1 URL: http://cgit.haiku-os.org/haiku/commit/?id=46cf7a5 Author: Przemysław Buczkowski <przemub@xxxxxxxx> Date: Wed Nov 14 09:48:33 2012 UTC Committer: Matt Madia <mattmadia@xxxxxxxxx> Commit-Date: Sun Dec 9 13:47:46 2012 UTC Ticket: https://dev.haiku-os.org/ticket/8974 Fix typos: super block -> superblock (#8974) Signed-off-by: Przemysław Buczkowski <przemub@xxxxxxxx> Signed-off-by: Matt Madia <mattmadia@xxxxxxxxx> ---------------------------------------------------------------------------- diff --git a/docs/develop/kernel/boot/boot_process_specs_x86.html b/docs/develop/kernel/boot/boot_process_specs_x86.html index a986bf1..a4f0f2a 100644 --- a/docs/develop/kernel/boot/boot_process_specs_x86.html +++ b/docs/develop/kernel/boot/boot_process_specs_x86.html @@ -28,11 +28,11 @@ </p> <p> It resides in the first first 1024 bytes of a BFS disk which usually refers to the - first two sectors of the partition in question. Since the BFS super block is located + first two sectors of the partition in question. Since the BFS superblock is located at byte offset 512, and about 170 bytes large, this section is already reserved, and thus cannot be used by the loader itself.<br> The MBR only loads the first sector of a partition into memory, so it has to load - the super block (and the rest of its implementation) by itself. + the superblock (and the rest of its implementation) by itself. </p> <p> The loader must be able to load the real boot loader from a certain path, and diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index feebed3..68c4e03 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -597,7 +597,7 @@ BlockAllocator::InitializeAndClearBitmap(Transaction& transaction) memset(buffer, 0, numBits >> 3); off_t offset = 1; - // the bitmap starts directly after the super block + // the bitmap starts directly after the superblock // initialize the AllocationGroup objects and clear the on-disk bitmap @@ -926,7 +926,7 @@ BlockAllocator::AllocateBlocks(Transaction& transaction, int32 groupIndex, fVolume->SuperBlock().used_blocks = HOST_ENDIAN_TO_BFS_INT64(fVolume->UsedBlocks() + bestLength); - // We are not writing back the disk's super block - it's + // We are not writing back the disk's superblock - it's // either done by the journaling code, or when the disk // is unmounted. // If the value is not correct at mount time, it will be diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.cpp b/src/add-ons/kernel/file_systems/bfs/Inode.cpp index 8abf77c..ff1ddca 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Inode.cpp @@ -2556,7 +2556,7 @@ Inode::Remove(Transaction& transaction, const char* name, ino_t* _id, adds the created inode to that parent directory. If an attribute directory is created, it will also automatically be added to the \a parent inode as such. However, the indices root node, and the regular root node won't be - added to the super block. + added to the superblock. It will also create the initial B+tree for the inode if it's a directory of any kind. \a name may be \c NULL, but only if no \a parent is given. diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.cpp b/src/add-ons/kernel/file_systems/bfs/Journal.cpp index a10f76f..fa62b52 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Journal.cpp @@ -499,10 +499,10 @@ Journal::_ReplayRunArray(int32* _start) // TODO: eventually check other well known offsets, like the // root and index dirs if (offset == 0) { - // This log entry writes over the super block - check if + // This log entry writes over the superblock - check if // it's valid! if (Volume::CheckSuperBlock(data) != B_OK) { - FATAL(("Log contains invalid super block!\n")); + FATAL(("Log contains invalid superblock!\n")); RETURN_ERROR(B_BAD_DATA); } } @@ -663,7 +663,7 @@ Journal::_TransactionWritten(int32 transactionID, int32 event, void* _logEntry) delete logEntry; - // update the super block, and change the disk's state, if necessary + // update the superblock, and change the disk's state, if necessary if (update) { if (superBlock.log_start == superBlock.log_end) @@ -671,7 +671,7 @@ Journal::_TransactionWritten(int32 transactionID, int32 event, void* _logEntry) status_t status = journal->fVolume->WriteSuperBlock(); if (status != B_OK) { - FATAL(("_TransactionWritten: could not write back super block: %s\n", + FATAL(("_TransactionWritten: could not write back superblock: %s\n", strerror(status))); } @@ -864,7 +864,7 @@ Journal::_WriteTransactionToLog() logEntry->SetTransactionID(fTransactionID); #endif - // Update the log end pointer in the super block + // Update the log end pointer in the superblock fVolume->SuperBlock().flags = SUPER_BLOCK_DISK_DIRTY; fVolume->SuperBlock().log_end = HOST_ENDIAN_TO_BFS_INT64(logPosition); diff --git a/src/add-ons/kernel/file_systems/bfs/Volume.cpp b/src/add-ons/kernel/file_systems/bfs/Volume.cpp index 42b9bea..2ce9f5f 100644 --- a/src/add-ons/kernel/file_systems/bfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Volume.cpp @@ -4,7 +4,7 @@ */ -//! super block, mounting, etc. +//! superblock, mounting, etc. #include "Attribute.h" @@ -342,13 +342,13 @@ Volume::Mount(const char* deviceName, uint32 flags) if (opener.IsReadOnly()) fFlags |= VOLUME_READ_ONLY; - // read the super block + // read the superblock if (Identify(fDevice, &fSuperBlock) != B_OK) { - FATAL(("invalid super block!\n")); + FATAL(("invalid superblock!\n")); return B_BAD_VALUE; } - // initialize short hands to the super block (to save byte swapping) + // initialize short hands to the superblock (to save byte swapping) fBlockSize = fSuperBlock.BlockSize(); fBlockShift = fSuperBlock.BlockShift(); fAllocationGroupShift = fSuperBlock.AllocationGroupShift(); @@ -633,7 +633,7 @@ Volume::CheckSuperBlock(const uint8* data, uint32* _offset) } #ifndef BFS_LITTLE_ENDIAN_ONLY - // For PPC, the super block might be located at offset 0 + // For PPC, the superblock might be located at offset 0 superBlock = (disk_super_block*)data; if (superBlock->IsValid()) { if (_offset != NULL) @@ -692,11 +692,11 @@ Volume::Initialize(int fd, const char* name, uint32 blockSize, off_t numBlocks = deviceSize / blockSize; - // create valid super block + // create valid superblock fSuperBlock.Initialize(name, numBlocks, blockSize); - // initialize short hands to the super block (to save byte swapping) + // initialize short hands to the superblock (to save byte swapping) fBlockSize = fSuperBlock.BlockSize(); fBlockShift = fSuperBlock.BlockShift(); fAllocationGroupShift = fSuperBlock.AllocationGroupShift(); diff --git a/src/add-ons/kernel/file_systems/btrfs/Volume.cpp b/src/add-ons/kernel/file_systems/btrfs/Volume.cpp index 13fc482..0afac4c 100644 --- a/src/add-ons/kernel/file_systems/btrfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/btrfs/Volume.cpp @@ -5,7 +5,7 @@ */ -//! Super block, mounting, etc. +//! Superblock, mounting, etc. #include "Volume.h" @@ -270,7 +270,7 @@ Volume::Mount(const char* deviceName, uint32 flags) if (opener.IsReadOnly()) fFlags |= VOLUME_READ_ONLY; - // read the super block + // read the superblock status_t status = Identify(fDevice, &fSuperBlock); if (status != B_OK) { ERROR("Volume::Mount(): Identify() failed\n"); @@ -526,7 +526,7 @@ Volume::Identify(int fd, btrfs_super_block* superBlock) return B_IO_ERROR; if (!superBlock->IsValid()) { - ERROR("invalid super block!\n"); + ERROR("invalid superblock!\n"); return B_BAD_VALUE; } diff --git a/src/add-ons/kernel/file_systems/exfat/Volume.cpp b/src/add-ons/kernel/file_systems/exfat/Volume.cpp index 528ecb4..1881909 100644 --- a/src/add-ons/kernel/file_systems/exfat/Volume.cpp +++ b/src/add-ons/kernel/file_systems/exfat/Volume.cpp @@ -5,7 +5,7 @@ */ -//! Super block, mounting, etc. +//! Superblock, mounting, etc. #include "Volume.h" @@ -310,7 +310,7 @@ Volume::Mount(const char* deviceName, uint32 flags) if (opener.IsReadOnly()) fFlags |= VOLUME_READ_ONLY; - // read the super block + // read the superblock status_t status = Identify(fDevice, &fSuperBlock); if (status != B_OK) { ERROR("Volume::Mount(): Identify() failed\n"); @@ -502,7 +502,7 @@ Volume::Identify(int fd, exfat_super_block* superBlock) return B_IO_ERROR; if (!superBlock->IsValid()) { - ERROR("invalid super block!\n"); + ERROR("invalid superblock!\n"); return B_BAD_VALUE; } diff --git a/src/add-ons/kernel/file_systems/ext2/Volume.cpp b/src/add-ons/kernel/file_systems/ext2/Volume.cpp index 3ff776a..b833eee 100644 --- a/src/add-ons/kernel/file_systems/ext2/Volume.cpp +++ b/src/add-ons/kernel/file_systems/ext2/Volume.cpp @@ -5,7 +5,7 @@ */ -//! Super block, mounting, etc. +//! Superblock, mounting, etc. #include "Volume.h" @@ -300,7 +300,7 @@ Volume::Mount(const char* deviceName, uint32 flags) fSuperBlock.CompatibleFeatures(), fSuperBlock.IncompatibleFeatures(), fSuperBlock.ReadOnlyFeatures()); - // read the super block + // read the superblock status_t status = Identify(fDevice, &fSuperBlock); if (status != B_OK) { FATAL("Volume::Mount(): Identify() failed\n"); @@ -311,7 +311,7 @@ Volume::Mount(const char* deviceName, uint32 flags) if (!IsReadOnly() && _UnsupportedReadOnlyFeatures(fSuperBlock) != 0) return B_UNSUPPORTED; - // initialize short hands to the super block (to save byte swapping) + // initialize short hands to the superblock (to save byte swapping) fBlockShift = fSuperBlock.BlockShift(); if (fBlockShift < 10 || fBlockShift > 16) return B_ERROR; @@ -930,7 +930,7 @@ Volume::Identify(int fd, ext2_super_block* superBlock) return B_IO_ERROR; if (!superBlock->IsValid()) { - FATAL("invalid super block!\n"); + FATAL("invalid superblock!\n"); return B_BAD_VALUE; } diff --git a/src/add-ons/kernel/file_systems/reiserfs/SuperBlock.cpp b/src/add-ons/kernel/file_systems/reiserfs/SuperBlock.cpp index 6fe1507..0051223 100644 --- a/src/add-ons/kernel/file_systems/reiserfs/SuperBlock.cpp +++ b/src/add-ons/kernel/file_systems/reiserfs/SuperBlock.cpp @@ -30,12 +30,12 @@ using std::nothrow; /*! \class DirEntry - \brief Represents the on-disk structure for super block of the FS. + \brief Represents the on-disk structure for superblock of the FS. There exist two versions of the structure and this class can deal with both of them. This class can also handle a very old layout that puts the super block in a different location. The Init() methods tries to find and read - the super block from disk. + the superblock from disk. */ // read_super_block @@ -47,13 +47,13 @@ read_super_block(int device, off_t offset, const char *magic, { super_block_t *superBlock = NULL; status_t error = B_OK; - // allocate memory for the super block + // allocate memory for the superblock if (error == B_OK) { superBlock = new(nothrow) super_block_t; if (!superBlock) error = B_NO_MEMORY; } - // read the super block + // read the superblock if (error == B_OK) { size_t size = sizeof(super_block_t); if (read_pos(device, offset, superBlock, size) != (int32)size) diff --git a/src/add-ons/kernel/file_systems/reiserfs/Volume.cpp b/src/add-ons/kernel/file_systems/reiserfs/Volume.cpp index f40ff2f..5c84896 100644 --- a/src/add-ons/kernel/file_systems/reiserfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/reiserfs/Volume.cpp @@ -57,7 +57,7 @@ static inline C max(const C &a, const C &b) { return (a > b ? a : b); } \brief Represents a volume. The Volume class bundles all functionality related to a volume. - It knows the super block and has some basic functionality needed + It knows the superblock and has some basic functionality needed for handling VNodes. Actually it should be the layer that provides the abstraction from VNodes. The design is not strict in this respect (the whole thing evolved while I was in the process of understanding @@ -97,7 +97,7 @@ Volume::Identify(int fd, partition_data *partition) if (fDevice < 0) return B_ERROR; - // read and analyze super block + // read and analyze superblock return _ReadSuperBlock(); } @@ -130,7 +130,7 @@ Volume::Mount(fs_volume *fsVolume, const char *path) if (fDevice < 0) SET_ERROR(error, errno); } - // read and analyze super block + // read and analyze superblock if (error == B_OK) error = _ReadSuperBlock(); @@ -534,12 +534,12 @@ Volume::_ReadSuperBlock() error = B_NO_MEMORY; // check FS state if (error == B_OK && fSuperBlock->GetState() != REISERFS_VALID_FS) { - FATAL(("The super block indicates a non-valid FS! Bailing out.")); + FATAL(("The superblock indicates a non-valid FS! Bailing out.")); error = B_ERROR; } // check FS version if (error == B_OK && fSuperBlock->GetVersion() > REISERFS_VERSION_2) { - FATAL(("The super block indicates a version greater than 2 (%u)! " + FATAL(("The superblock indicates a version greater than 2 (%u)! " "Bailing out.", fSuperBlock->GetVersion())); error = B_ERROR; } diff --git a/src/add-ons/kernel/file_systems/reiserfs/reiserfs.h b/src/add-ons/kernel/file_systems/reiserfs/reiserfs.h index d51315f..35aa36a 100644 --- a/src/add-ons/kernel/file_systems/reiserfs/reiserfs.h +++ b/src/add-ons/kernel/file_systems/reiserfs/reiserfs.h @@ -220,7 +220,7 @@ struct reiserfs_de_head // // -// super block's field values +// superblock's field values // #define REISERFS_VERSION_0 0 /* undistributed bitmap */ #define REISERFS_VERSION_1 1 /* distributed bitmap and resizer*/ @@ -232,7 +232,7 @@ struct reiserfs_de_head #define R5_HASH 3 #define DEFAULT_HASH R5_HASH -/* this is the on disk super block */ +/* this is the on disk superblock */ struct reiserfs_super_block { diff --git a/src/add-ons/kernel/file_systems/userlandfs/userlandfs b/src/add-ons/kernel/file_systems/userlandfs/userlandfs index aef6d9e..050f4e3 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/userlandfs +++ b/src/add-ons/kernel/file_systems/userlandfs/userlandfs @@ -39,7 +39,7 @@ file_system obfs { is_buffer false } - # dump super block + # dump superblock ioctl 56743 { buffer_size 0 write_buffer_size 0 diff --git a/src/bin/bfs_tools/bfsinfo.cpp b/src/bin/bfs_tools/bfsinfo.cpp index 6b7438b..44b64cc 100644 --- a/src/bin/bfs_tools/bfsinfo.cpp +++ b/src/bin/bfs_tools/bfsinfo.cpp @@ -118,7 +118,7 @@ main(int argc, char **argv) if (argc < 2 || !strcmp(argv[1], "--help")) { char *filename = strrchr(argv[0],'/'); fprintf(stderr,"usage: %s [-srib] <device> [allocation_group start]\n" - "\t-s\tdump super block\n" + "\t-s\tdump superblock\n" "\t-r\tdump root node\n" " the following options need the allocation_group/start " "parameters:\n" @@ -214,7 +214,7 @@ main(int argc, char **argv) } if (disk.ValidateSuperBlock() < B_OK) { - fprintf(stderr, "The disk's super block is corrupt (or it's not a BFS " + fprintf(stderr, "The disk's superblock is corrupt (or it's not a BFS " "device)!\n"); return 0; } diff --git a/src/bin/bfs_tools/bfswhich.cpp b/src/bin/bfs_tools/bfswhich.cpp index 973cdce..61b870a 100644 --- a/src/bin/bfs_tools/bfswhich.cpp +++ b/src/bin/bfs_tools/bfswhich.cpp @@ -286,7 +286,7 @@ main(int argc, char** argv) } if (disk.ValidateSuperBlock() != B_OK) { - fprintf(stderr, "The disk's super block is corrupt!\n"); + fprintf(stderr, "The disk's superblock is corrupt!\n"); return -1; } @@ -307,7 +307,7 @@ main(int argc, char** argv) disk.Log().allocation_group, disk.Log().start, disk.Log().length); } else if (block < 1) { - printf("Super Block intersects\n"); + printf("Superblock intersects\n"); } else if (block < 1 + disk.BitmapSize()) { printf("Block bitmap intersects (start %d, end %lu)\n", 1, disk.BitmapSize()); diff --git a/src/bin/bfs_tools/lib/Disk.h b/src/bin/bfs_tools/lib/Disk.h index 890a14e..37aa51c 100644 --- a/src/bin/bfs_tools/lib/Disk.h +++ b/src/bin/bfs_tools/lib/Disk.h @@ -1,6 +1,6 @@ #ifndef DISK_H #define DISK_H -/* Disk - handles BFS super block, disk access etc. +/* Disk - handles BFS superblock, disk access etc. ** ** Copyright (c) 2001-2003 pinc Software. All Rights Reserved. */ diff --git a/src/bin/bfs_tools/recover.cpp b/src/bin/bfs_tools/recover.cpp index 9a2677e..a556c9e 100644 --- a/src/bin/bfs_tools/recover.cpp +++ b/src/bin/bfs_tools/recover.cpp @@ -709,7 +709,7 @@ usage(char *name) "\t-i\trecreate indices on target disk\n" "\t-d\tdump missing and recreated i-nodes\n" "\t-r\tdisk access in raw mode (use only if the partition table is invalid)\n" - "\t-s\trecreate super block and exit (for experts only, don't use this\n" + "\t-s\trecreate superblock and exit (for experts only, don't use this\n" "\t\tif you don't know what you're doing)\n" "\t-v\tverbose output\n", name); exit(-1); @@ -804,15 +804,15 @@ main(int argc, char **argv) bool recreatedSuperBlock = false; if (disk.ValidateSuperBlock() < B_OK) { - fprintf(stderr, "The disk's super block is corrupt!\n"); + fprintf(stderr, "The disk's superblock is corrupt!\n"); if (disk.RecreateSuperBlock() < B_OK) { - fprintf(stderr, "Can't recreate the disk's super block, sorry!\n"); + fprintf(stderr, "Can't recreate the disk's superblock, sorry!\n"); return -1; } recreatedSuperBlock = true; } if (gVerbose) { - puts("\n*** The super block:\n"); + puts("\n*** The superblock:\n"); dump_super_block(disk.SuperBlock()); } @@ -825,7 +825,7 @@ main(int argc, char **argv) status_t status = disk.WriteAt(512, disk.SuperBlock(), sizeof(disk_super_block)); if (status < B_OK) { - fprintf(stderr, "Could not write super block: %s!\n", + fprintf(stderr, "Could not write superblock: %s!\n", strerror(status)); return 1; } diff --git a/src/bin/coreutils/man/sync.1 b/src/bin/coreutils/man/sync.1 index ac69912..3c17ffe 100644 --- a/src/bin/coreutils/man/sync.1 +++ b/src/bin/coreutils/man/sync.1 @@ -8,7 +8,7 @@ sync \- flush file system buffers .SH DESCRIPTION .\" Add any additional description here .PP -Force changed blocks to disk, update the super block. +Force changed blocks to disk, update the superblock. .TP \fB\-\-help\fR display this help and exit diff --git a/src/bin/coreutils/src/sync.c b/src/bin/coreutils/src/sync.c index 730df10..81a5fa9 100644 --- a/src/bin/coreutils/src/sync.c +++ b/src/bin/coreutils/src/sync.c @@ -1,4 +1,4 @@ -/* sync - update the super block +/* sync - update the superblock Copyright (C) 1994-2004, 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -40,7 +40,7 @@ usage (int status) { printf (_("Usage: %s [OPTION]\n"), program_name); fputs (_("\ -Force changed blocks to disk, update the super block.\n\ +Force changed blocks to disk, update the superblock.\n\ \n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); diff --git a/src/system/boot/loader/file_systems/bfs/bfs.cpp b/src/system/boot/loader/file_systems/bfs/bfs.cpp index 26da30f..f6cfd3b 100644 --- a/src/system/boot/loader/file_systems/bfs/bfs.cpp +++ b/src/system/boot/loader/file_systems/bfs/bfs.cpp @@ -54,7 +54,7 @@ Volume::Volume(boot::Partition *partition) #endif } - TRACE(("bfs: we do have a valid super block (name = %s)!\n", fSuperBlock.name)); + TRACE(("bfs: we do have a valid superblock (name = %s)!\n", fSuperBlock.name)); fRootNode = new(nothrow) BFS::Directory(*this, Root()); if (fRootNode == NULL) diff --git a/src/system/boot/platform/atari_m68k/devices.cpp b/src/system/boot/platform/atari_m68k/devices.cpp index 93f9c5b..002467c 100644 --- a/src/system/boot/platform/atari_m68k/devices.cpp +++ b/src/system/boot/platform/atari_m68k/devices.cpp @@ -317,7 +317,7 @@ fill_disk_identifier_v2(disk_identifier &disk, const drive_parameters ¶meter static off_t get_next_check_sum_offset(int32 index, off_t maxSize) { - // The boot block often contains the disk super block, and should be + // The boot block often contains the disk superblock, and should be // unique enough for most cases if (index < 2) return index * 512; diff --git a/src/system/boot/platform/bios_ia32/devices.cpp b/src/system/boot/platform/bios_ia32/devices.cpp index 5c50c47..3a93f2f 100644 --- a/src/system/boot/platform/bios_ia32/devices.cpp +++ b/src/system/boot/platform/bios_ia32/devices.cpp @@ -368,7 +368,7 @@ fill_disk_identifier_v2(disk_identifier &disk, const drive_parameters ¶meter static off_t get_next_check_sum_offset(int32 index, off_t maxSize) { - // The boot block often contains the disk super block, and should be + // The boot block often contains the disk superblock, and should be // unique enough for most cases if (index < 2) return index * 512; diff --git a/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp b/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp index 2bdfe1e..42e99cb 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/dump_log/dump_log.cpp @@ -147,7 +147,7 @@ dumpLogEntry(int device, disk_super_block &superBlock, int32 &start, uint8 *bloc break; off_t value = array[arrayIndex]; - printf("%7ld: %Ld%s\n", index, value, value == 0 ? " (super block)" : + printf("%7ld: %Ld%s\n", index, value, value == 0 ? " (superblock)" : value < bitmapSize + 1 ? " (bitmap block)" : ""); if (data != NULL) { @@ -208,12 +208,12 @@ main(int argc, char **argv) disk_super_block superBlock; if (read_pos(device, 512, &superBlock, sizeof(disk_super_block)) < (ssize_t)sizeof(disk_super_block)) { - fprintf(stderr, "%s: could not read super block.\n", sProgramName); + fprintf(stderr, "%s: could not read superblock.\n", sProgramName); return -1; } if (!superBlock.IsValid()) { - fprintf(stderr, "%s: invalid super block!\n", sProgramName); + fprintf(stderr, "%s: invalid superblock!\n", sProgramName); return -1; } diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/BlockAllocator.cpp b/src/tests/add-ons/kernel/file_systems/bfs/r5/BlockAllocator.cpp index bd55c4c..b2c558f 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/BlockAllocator.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/BlockAllocator.cpp @@ -568,7 +568,7 @@ BlockAllocator::AllocateBlocks(Transaction *transaction, int32 group, uint16 sta fVolume->SuperBlock().used_blocks = HOST_ENDIAN_TO_BFS_INT64(fVolume->UsedBlocks() + numBlocks); - // We are not writing back the disk's super block - it's + // We are not writing back the disk's superblock - it's // either done by the journaling code, or when the disk // is unmounted. // If the value is not correct at mount time, it will be diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp b/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp index 93460d9..b0cfe63 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp @@ -1928,7 +1928,7 @@ Inode::Remove(Transaction *transaction, const char *name, off_t *_id, bool isDir * adds the created inode to that parent directory. If an attribute directory * is created, it will also automatically added to the parent inode as such. * However, the indices root node, and the regular root node won't be added - * to the super block. + * to the superblock. * It will also create the initial B+tree for the inode if it's a directory * of any kind. * If the "_id" or "_inode" variable is given and non-NULL to store the inode's diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/Journal.cpp b/src/tests/add-ons/kernel/file_systems/bfs/r5/Journal.cpp index b5cadf5..1656afa 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/Journal.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/Journal.cpp @@ -307,7 +307,7 @@ Journal::blockNotify(off_t blockNumber, size_t numBlocks, void *arg) free(logEntry); - // update the super block, and change the disk's state, if necessary + // update the superblock, and change the disk's state, if necessary if (update) { journal->fVolume->LogStart() = superBlock.log_start; @@ -317,7 +317,7 @@ Journal::blockNotify(off_t blockNumber, size_t numBlocks, void *arg) status_t status = journal->fVolume->WriteSuperBlock(); if (status != B_OK) - FATAL(("blockNotify: could not write back super block: %s\n", strerror(status))); + FATAL(("blockNotify: could not write back superblock: %s\n", strerror(status))); } } @@ -421,7 +421,7 @@ Journal::WriteLogEntry() fUsed += array->CountItems(); - // Update the log end pointer in the super block + // Update the log end pointer in the superblock fVolume->SuperBlock().flags = HOST_ENDIAN_TO_BFS_INT32(SUPER_BLOCK_DISK_DIRTY); fVolume->SuperBlock().log_end = HOST_ENDIAN_TO_BFS_INT64(logPosition); fVolume->LogEnd() = logPosition; diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/ToDo b/src/tests/add-ons/kernel/file_systems/bfs/r5/ToDo index 8a4f8be..0ab920b 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/ToDo +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/ToDo @@ -76,7 +76,7 @@ kernel_interface general stuff - There are also some comments with a leading "ToDo:" directly in the code which may not be mentioned here. - - implement mkbfs (try to do it in OpenBeOS style directly - only write the super block from user space) + - implement mkbfs (try to do it in OpenBeOS style directly - only write the superblock from user space) ----- diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/SuperBlock.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/SuperBlock.cpp index 24fcc09..ca33dc3 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/SuperBlock.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/SuperBlock.cpp @@ -30,10 +30,10 @@ using std::nothrow; /*! \class DirEntry - \brief Represents the on-disk structure for super block of the FS. + \brief Represents the on-disk structure for superblock of the FS. There exist two versions of the structure and this class can deal with - both of them. The Init() methods tries to find and read the super block + both of them. The Init() methods tries to find and read the superblock from disk. */ @@ -46,13 +46,13 @@ read_super_block(int device, off_t offset, const char *magic, { super_block_t *superBlock = NULL; status_t error = B_OK; - // allocate memory for the super block + // allocate memory for the superblock if (error == B_OK) { superBlock = new(nothrow) super_block_t; if (!superBlock) error = B_NO_MEMORY; } - // read the super block + // read the superblock if (error == B_OK) { size_t size = sizeof(super_block_t); if (read_pos(device, offset, superBlock, size) != (int32)size) diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/Volume.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/Volume.cpp index a63c0c2..661fee9 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/Volume.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/Volume.cpp @@ -53,7 +53,7 @@ static inline C max(const C &a, const C &b) { return (a > b ? a : b); } \brief Represents a volume. The Volume class bundles all functionality related to a volume. - It knows the super block and has some basic functionality needed + It knows the superblock and has some basic functionality needed for handling VNodes. Actually it should be the layer that provides the abstraction from VNodes. The design is not strict in this respect (the whole thing evolved while I was in the process of understanding @@ -111,7 +111,7 @@ Volume::Mount(nspace_id id, const char *path) if (fDevice < 0) SET_ERROR(error, errno); } - // read and analyze super block + // read and analyze superblock if (error == B_OK) error = _ReadSuperBlock(); // create and init block cache @@ -497,12 +497,12 @@ Volume::_ReadSuperBlock() error = B_NO_MEMORY; // check FS state if (error == B_OK && fSuperBlock->GetState() != REISERFS_VALID_FS) { - FATAL(("The super block indicates a non-valid FS! Bailing out.")); + FATAL(("The superblock indicates a non-valid FS! Bailing out.")); error = B_ERROR; } // check FS version if (error == B_OK && fSuperBlock->GetVersion() > REISERFS_VERSION_2) { - FATAL(("The super block indicates a version greater than 2 (%u)! " + FATAL(("The superblock indicates a version greater than 2 (%u)! " "Bailing out.", fSuperBlock->GetVersion())); error = B_ERROR; } diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/reiserfs.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/reiserfs.h index 4fe1ab0..53cbb06 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/reiserfs.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/reiserfs/reiserfs.h @@ -220,7 +220,7 @@ struct reiserfs_de_head // // -// super block's field values +// superblock's field values // #define REISERFS_VERSION_0 0 /* undistributed bitmap */ #define REISERFS_VERSION_1 1 /* distributed bitmap and resizer*/ @@ -232,7 +232,7 @@ struct reiserfs_de_head #define R5_HASH 3 #define DEFAULT_HASH R5_HASH -/* this is the on disk super block */ +/* this is the on disk superblock */ struct reiserfs_super_block { diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/userlandfs.sample b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/userlandfs.sample index aef6d9e..050f4e3 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/userlandfs.sample +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/userlandfs.sample @@ -39,7 +39,7 @@ file_system obfs { is_buffer false } - # dump super block + # dump superblock ioctl 56743 { buffer_size 0 write_buffer_size 0 diff --git a/src/tests/system/kernel/file_corruption/fs/BlockAllocator.cpp b/src/tests/system/kernel/file_corruption/fs/BlockAllocator.cpp index 4b9ce59..79e26b4 100644 --- a/src/tests/system/kernel/file_corruption/fs/BlockAllocator.cpp +++ b/src/tests/system/kernel/file_corruption/fs/BlockAllocator.cpp @@ -722,7 +722,7 @@ BlockAllocator::_FreeInBitmapBlock(uint64 base, uint32 count, status_t BlockAllocator::_UpdateSuperBlock(Transaction& transaction) { - // write the super block + // write the superblock Block block; if (!block.GetWritable(fVolume, kCheckSumFSSuperBlockOffset / B_PAGE_SIZE, transaction)) { diff --git a/src/tests/system/kernel/file_corruption/fs/Volume.cpp b/src/tests/system/kernel/file_corruption/fs/Volume.cpp index ff642e8..82d32dd 100644 --- a/src/tests/system/kernel/file_corruption/fs/Volume.cpp +++ b/src/tests/system/kernel/file_corruption/fs/Volume.cpp @@ -209,7 +209,7 @@ Volume::Initialize(const char* name) transaction.KeepNode(fRootDirectory); fRootDirectory->SetHardLinks(1); - // write the super block + // write the superblock Block block; if (!block.GetZero(this, kCheckSumFSSuperBlockOffset / B_PAGE_SIZE, transaction)) { @@ -432,7 +432,7 @@ Volume::SetName(const char* name) // we lock the volume now, to keep the locking order (transaction -> volume) MutexLocker locker(fLock); - // update the super block + // update the superblock Block block; if (!block.GetWritable(this, kCheckSumFSSuperBlockOffset / B_PAGE_SIZE, transaction)) { ############################################################################ Revision: hrev44988 Commit: 5644d283b63aa82f578848dd04eaf1f27cb4c060 URL: http://cgit.haiku-os.org/haiku/commit/?id=5644d28 Author: Matt Madia <mattmadia@xxxxxxxxx> Date: Sun Dec 9 13:51:58 2012 UTC Ticket: https://dev.haiku-os.org/ticket/8974 Manually applied: Fix typos: super block -> superblock (#8974) by: Przemysław Buczkowski <przemub@xxxxxxxx> ---------------------------------------------------------------------------- diff --git a/src/add-ons/kernel/file_systems/ext2/Journal.cpp b/src/add-ons/kernel/file_systems/ext2/Journal.cpp index d7f2d4c..ab65174 100644 --- a/src/add-ons/kernel/file_systems/ext2/Journal.cpp +++ b/src/add-ons/kernel/file_systems/ext2/Journal.cpp @@ -114,7 +114,7 @@ Journal::Journal(Volume* fsVolume, Volume* jVolume) fInitStatus = B_NO_MEMORY; else { fInitStatus = revokeManager->Init(); - + if (fInitStatus == B_OK) { fRevokeManager = revokeManager; fInitStatus = _LoadSuperBlock(); @@ -270,7 +270,7 @@ Journal::Unlock(Transaction* owner, bool success) { TRACE("Journal::Unlock(): Lock recursion: %ld\n", recursive_lock_get_recursion(&fLock)); - if (fSeparateSubTransactions + if (fSeparateSubTransactions || recursive_lock_get_recursion(&fLock) == 1) { // we only end the transaction if we unlock it if (owner != NULL) { @@ -309,7 +309,7 @@ Journal::MapBlock(off_t logical, fsblock_t& physical) { TRACE("Journal::MapBlock()\n"); physical = logical; - + return B_OK; } @@ -340,7 +340,7 @@ Journal::TransactionID() const status_t -Journal::_WritePartialTransactionToLog(JournalHeader* descriptorBlock, +Journal::_WritePartialTransactionToLog(JournalHeader* descriptorBlock, bool detached, uint8** _escapedData, uint32 &logBlock, off_t& blockNumber, long& cookie, ArrayDeleter<uint8>& escapedDataDeleter, uint32& blockCount, bool& finished) @@ -353,7 +353,7 @@ Journal::_WritePartialTransactionToLog(JournalHeader* descriptorBlock, JournalBlockTag* tag = (JournalBlockTag*)descriptorBlock->data; JournalBlockTag* lastTag = (JournalBlockTag*)((uint8*)descriptorBlock + fBlockSize - sizeof(JournalHeader)); - + finished = false; status_t status = B_OK; @@ -430,11 +430,11 @@ Journal::_WritePartialTransactionToLog(JournalHeader* descriptorBlock, } finished = status != B_OK; - + // Write descriptor block --tag; tag->SetLastTagFlag(); - + fsblock_t physicalBlock; status = MapBlock(descriptorBlockPos, physicalBlock); if (status != B_OK) @@ -493,14 +493,14 @@ Journal::_WriteTransactionToLog() if (size > FreeLogBlocks()) { TRACE("Journal::_WriteTransactionToLog(): Syncing block cache\n"); cache_sync_transaction(fFilesystemBlockCache, fTransactionID); - + if (size > FreeLogBlocks()) { panic("Transaction fits, but sync didn't result in enough" "free space.\n\tGot %ld when at least %ld was expected.", FreeLogBlocks(), size); } } - + TRACE("Journal::_WriteTransactionToLog(): finished managing space for " "the transaction\n"); @@ -511,7 +511,7 @@ Journal::_WriteTransactionToLog() // Prepare Descriptor block TRACE("Journal::_WriteTransactionToLog(): attempting to allocate space for " "the descriptor block, block size %lu\n", fBlockSize); - JournalHeader* descriptorBlock = + JournalHeader* descriptorBlock = (JournalHeader*)new(std::nothrow) uint8[fBlockSize]; if (descriptorBlock == NULL) { TRACE("Journal::_WriteTransactionToLog(): Failed to allocate a buffer " @@ -525,7 +525,7 @@ Journal::_WriteTransactionToLog() // Prepare Commit block TRACE("Journal::_WriteTransactionToLog(): attempting to allocate space for " "the commit block, block size %lu\n", fBlockSize); - JournalHeader* commitBlock = + JournalHeader* commitBlock = (JournalHeader*)new(std::nothrow) uint8[fBlockSize]; if (descriptorBlock == NULL) { TRACE("Journal::_WriteTransactionToLog(): Failed to allocate a buffer " @@ -555,7 +555,7 @@ Journal::_WriteTransactionToLog() uint32 blockCount = 0; uint32 logBlock = _WrapAroundLog(fLogEnd); - + bool finished = false; status = _WritePartialTransactionToLog(descriptorBlock, detached, @@ -574,10 +574,10 @@ Journal::_WriteTransactionToLog() blockCount, finished); if (!finished && status != B_OK) return status; - + // It is okay to write the commit blocks of the partial transactions // as long as the commit block of the first partial transaction isn't - // written. When it recovery reaches where the first commit should be + // written. When it recovery reaches where the first commit should be // and doesn't find it, it considers it found the end of the log. fsblock_t physicalBlock; @@ -586,7 +586,7 @@ Journal::_WriteTransactionToLog() return status; off_t logOffset = physicalBlock * fBlockSize; - + TRACE("Journal::_WriteTransactionToLog(): Writting commit block to " "%lld\n", logOffset); off_t written = write_pos(fJournalVolume->Device(), logOffset, @@ -598,7 +598,7 @@ Journal::_WriteTransactionToLog() commitBlock->IncrementSequence(); blockCount++; - + logBlock = _WrapAroundLog(logBlock + 1); } @@ -617,7 +617,7 @@ Journal::_WriteTransactionToLog() TRACE("Failed to write journal commit block.\n"); return B_IO_ERROR; } - + blockCount++; fLogEnd = _WrapAroundLog(fLogEnd + blockCount); @@ -670,7 +670,7 @@ Journal::_SaveSuperBlock() off_t superblockPos = physicalBlock * fBlockSize; JournalSuperBlock superblock; - size_t bytesRead = read_pos(fJournalVolume->Device(), superblockPos, + size_t bytesRead = read_pos(fJournalVolume->Device(), superblockPos, &superblock, sizeof(superblock)); if (bytesRead != sizeof(superblock)) @@ -678,7 +678,7 @@ Journal::_SaveSuperBlock() superblock.SetFirstCommitID(fFirstCommitID); superblock.SetLogStart(fLogStart); - + TRACE("Journal::SaveSuperBlock(): Write to %lld\n", superblockPos); size_t bytesWritten = write_pos(fJournalVolume->Device(), superblockPos, &superblock, sizeof(superblock)); @@ -701,10 +701,10 @@ Journal::_LoadSuperBlock() status_t status = MapBlock(0, superblockPos); if (status != B_OK) return status; - - TRACE("Journal::_LoadSuperBlock(): super block physical block: %llu\n", + + TRACE("Journal::_LoadSuperBlock(): superblock physical block: %llu\n", superblockPos); - + JournalSuperBlock superblock; size_t bytesRead = read_pos(fJournalVolume->Device(), superblockPos * fJournalVolume->BlockSize(), &superblock, sizeof(superblock)); @@ -803,7 +803,7 @@ Journal::_CountTags(JournalHeader* descriptorBlock) if ((tags->Flags() & JOURNAL_FLAG_LAST_TAG) != 0) count++; - + TRACE("Journal::_CountTags(): counted tags: %lu\n", count); return count; @@ -824,7 +824,7 @@ Journal::Recover() status_t status = _RecoverPassScan(lastCommitID); if (status != B_OK) return status; - + status = _RecoverPassRevoke(lastCommitID); if (status != B_OK) return status; @@ -978,7 +978,7 @@ Journal::_RecoverPassReplay(uint32 lastCommitID) "data\n"); return B_NO_MEMORY; } - + ArrayDeleter<uint8> dataDeleter(data); while (nextCommitID < lastCommitID) { @@ -994,7 +994,7 @@ Journal::_RecoverPassReplay(uint32 lastCommitID) JournalBlockTag* last_tag = (JournalBlockTag*)((uint8*)header + fBlockSize - sizeof(JournalBlockTag)); - for (JournalBlockTag* tag = (JournalBlockTag*)header->data; + for (JournalBlockTag* tag = (JournalBlockTag*)header->data; tag <= last_tag; ++tag) { nextBlock = _WrapAroundLog(nextBlock + 1); @@ -1002,7 +1002,7 @@ Journal::_RecoverPassReplay(uint32 lastCommitID) if (status != B_OK) return status; - if (!fRevokeManager->Lookup(tag->BlockNumber(), + if (!fRevokeManager->Lookup(tag->BlockNumber(), nextCommitID)) { // Block isn't revoked size_t read = read_pos(fJournalVolume->Device(), @@ -1111,7 +1111,7 @@ Journal::_FlushLog(bool canWait, bool flushBlocks) TRACE("Journal::_FlushLog(): Finished. Releasing lock\n"); recursive_lock_unlock(&fLock); - + TRACE("Journal::_FlushLog(): Done, final status: %s\n", strerror(status)); return status; } @@ -1160,9 +1160,9 @@ Journal::_FullTransactionSize() const size_t count = cache_blocks_in_transaction(fFilesystemBlockCache, fTransactionID); - + TRACE("\tFull transaction size: %ld\n", count); - + return count; } @@ -1174,9 +1174,9 @@ Journal::_MainTransactionSize() const size_t count = cache_blocks_in_main_transaction(fFilesystemBlockCache, fTransactionID); - + TRACE("\tMain transaction size: %ld\n", count); - + return count; } @@ -1200,7 +1200,7 @@ Journal::_TransactionDone(bool success) TRACE("Journal::_TransactionDone(): returning B_OK\n"); return B_OK; } - + // If possible, delay flushing the transaction uint32 size = _FullTransactionSize(); TRACE("Journal::_TransactionDone(): full transaction size: %lu, max " @@ -1209,11 +1209,11 @@ Journal::_TransactionDone(bool success) if (fMaxTransactionSize > 0 && size < fMaxTransactionSize) { TRACE("Journal::_TransactionDone(): delaying flush of transaction " "%ld\n", fTransactionID); - + // Make sure the transaction fits in the log if (size < FreeLogBlocks()) cache_sync_transaction(fFilesystemBlockCache, fTransactionID); - + fUnwrittenTransactions++; TRACE("Journal::_TransactionDone(): returning B_OK\n"); return B_OK; @@ -1253,7 +1253,7 @@ Journal::_TransactionWritten(int32 transactionID, int32 event, void* _logEntry) if (journal->_SaveSuperBlock() != B_OK) panic("ext2: Failed to write journal superblock\n"); } - + TRACE("Journal::_TransactionWritten(): Removing log entry\n"); journal->fLogEntries.Remove(logEntry); diff --git a/src/bin/bfs_tools/chkindex.cpp b/src/bin/bfs_tools/chkindex.cpp index e31a827..8c141b6 100644 --- a/src/bin/bfs_tools/chkindex.cpp +++ b/src/bin/bfs_tools/chkindex.cpp @@ -52,10 +52,10 @@ class BlockRunHashtable : public Hashtable return false; memcpy(value,&run,sizeof(block_run)); - + if (Hashtable::Put(value,value)) return true; - + free(value); return false; } @@ -133,7 +133,7 @@ collectFiles(Disk &disk) return; } collectFiles(disk,root); - + printf(" %7Ld files found.\n",gCount); delete root; @@ -201,7 +201,7 @@ checkFiles(Disk &disk,BPlusTree &tree,char *attribute) { runs[index++] = *run; } - + // sort array to speed up disk access qsort(runs,index,sizeof(block_run),(int (*)(const void *,const void *))compareBlockRuns); @@ -227,7 +227,7 @@ checkFiles(Disk &disk,BPlusTree &tree,char *attribute) delete inode; continue; } - + // check indices not based on standard attributes if (sizeIndex) { @@ -422,7 +422,7 @@ main(int argc,char **argv) printUsage(toolName); return -1; } - + while (*++argv) { char *arg = *argv; @@ -447,7 +447,7 @@ main(int argc,char **argv) else break; } - + char *attribute = argv[0]; if (!gCheckAll && attribute == NULL) { @@ -476,13 +476,13 @@ main(int argc,char **argv) fprintf(stderr,"Could not open device or file \"%s\": %s\n",info.device_name,strerror(status)); return -1; } - + if (disk.ValidateSuperBlock() < B_OK) { - fprintf(stderr,"The disk's super block is corrupt!\n"); + fprintf(stderr,"The disk's superblock is corrupt!\n"); return -1; } - + Directory *indices = (Directory *)Inode::Factory(&disk,disk.Indices()); if (indices == NULL || (status = indices->InitCheck()) < B_OK) { @@ -497,7 +497,7 @@ main(int argc,char **argv) delete indices; return -1; } - + block_run run; if (gCheckAll) @@ -515,7 +515,7 @@ main(int argc,char **argv) fprintf(stderr," Could not find index directory for \"%s\"!\n",attribute); delete indices; - + gHashtable.MakeEmpty(HASH_EMPTY_NONE,HASH_EMPTY_FREE); return 0; diff --git a/src/bin/bfs_tools/lib/Disk.cpp b/src/bin/bfs_tools/lib/Disk.cpp index 5571a29..5d0fd07 100644 --- a/src/bin/bfs_tools/lib/Disk.cpp +++ b/src/bin/bfs_tools/lib/Disk.cpp @@ -2,7 +2,7 @@ * Copyright (c) 2001-2008 pinc Software. All Rights Reserved. */ -//! Handles BFS super block, disk access etc. +//! Handles BFS superblock, disk access etc. #include "Disk.h" #include "dump.h" @@ -157,7 +157,7 @@ Disk::Disk(const char *deviceName, bool rawMode, off_t start, off_t stop) if (fBufferedFile->ReadAt(512 + fRawDiskOffset, &fSuperBlock, sizeof(disk_super_block)) < 1) - fprintf(stderr,"Disk: Could not read super block\n"); + fprintf(stderr,"Disk: Could not read superblock\n"); //dump_super_block(&fSuperBlock); } @@ -277,21 +277,21 @@ Disk::ScanForSuperBlock(off_t start, off_t stop) printf("\n(%ld) *** BFS superblock found at: %Ld\n",superBlocks.CountItems() + 1,offset); dump_super_block(super); - // add a copy of the super block to the list + // add a copy of the superblock to the list bfs_disk_info *info = (bfs_disk_info *)malloc(sizeof(bfs_disk_info)); if (info == NULL) return B_NO_MEMORY; memcpy(&info->super_block, super, sizeof(disk_super_block)); info->offset = offset + i - 512; - /* location off the BFS super block is 512 bytes after the partition start */ + /* location off the BFS superblock is 512 bytes after the partition start */ superBlocks.AddItem(info); } } } if (superBlocks.CountItems() == 0) { - puts("\nCouldn't find any BFS super blocks!"); + puts("\nCouldn't find any BFS superblocks!"); return B_ENTRY_NOT_FOUND; } @@ -411,7 +411,7 @@ Disk::RecreateSuperBlock() bfs_inode indexDir; bfs_inode rootDir; if (ScanForIndexAndRoot(&indexDir,&rootDir) < B_OK) { - fprintf(stderr,"ERROR: Could not find root directory! Trying to recreate the super block will have no effect!\n\tSetting standard values for the root dir.\n"); + fprintf(stderr,"ERROR: Could not find root directory! Trying to recreate the superblock will have no effect!\n\tSetting standard values for the root dir.\n"); rootDir.inode_num.allocation_group = 8; rootDir.inode_num.start = 0; rootDir.inode_num.length = 1; diff --git a/src/system/boot/platform/bios_ia32/stage1.S b/src/system/boot/platform/bios_ia32/stage1.S index d8ce118..af46369 100644 --- a/src/system/boot/platform/bios_ia32/stage1.S +++ b/src/system/boot/platform/bios_ia32/stage1.S @@ -130,7 +130,7 @@ struc BlockRun .length resw 1 endstruc -; BFS super block +; BFS superblock struc SuperBlock .name resb 32 .magic1 resd 1 @@ -665,7 +665,7 @@ kBootBlockSignature dw 0xaa55 second_boot_block: -; first comes the BFS super block +; first comes the BFS superblock superblock: %rep sizeof(SuperBlock) db 0 diff --git a/src/tests/add-ons/kernel/file_systems/bfs/fragmenter/fragmenter.cpp b/src/tests/add-ons/kernel/file_systems/bfs/fragmenter/fragmenter.cpp index 74e016a..8d9a20d 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/fragmenter/fragmenter.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/fragmenter/fragmenter.cpp @@ -90,7 +90,7 @@ count_bits(int value) count++; value >>= 1; } - + return count; } @@ -102,7 +102,7 @@ main(int argc, const char *const *argv) exit(1); } - const char *fileName = argv[1]; + const char *fileName = argv[1]; const char *patternString = (argc >= 3 ? argv[2] : "0f"); // skip leading "0x" in the pattern string @@ -151,12 +151,12 @@ main(int argc, const char *const *argv) exit(1); } - // read super block + // read superblock disk_super_block superBlock; read_from(fd, 512, &superBlock, sizeof(superBlock)); if (superBlock.magic1 != SUPER_BLOCK_MAGIC1) { - fprintf(stderr, "Error: Bad super block magic. This is probably not a " + fprintf(stderr, "Error: Bad superblock magic. This is probably not a " "BFS image.\n"); exit(1); } @@ -172,12 +172,12 @@ main(int argc, const char *const *argv) int64 blockCount = st.st_size / blockSize; if (blockCount != superBlock.num_blocks) { fprintf(stderr, "Error: Number of blocks in image and the number in " - "the super block differ: %lld vs. %lld\n", blockCount, + "the superblock differ: %lld vs. %lld\n", blockCount, superBlock.num_blocks); exit(1); } - - + + // iterate through the block bitmap blocks and or the bytes with 0x0f uint8 *block = new uint8[blockSize]; int64 occupiedBlocks = 0; @@ -206,10 +206,10 @@ main(int argc, const char *const *argv) printf("bfs_fragmenter: marked %lld blocks used\n", occupiedBlocks); - // write back the super block + // write back the superblock superBlock.used_blocks += occupiedBlocks; write_to(fd, 512, &superBlock, sizeof(superBlock)); - + return 0; } diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp b/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp index 3eb82e2..a5d6f9e 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp @@ -3,7 +3,7 @@ * This file may be used under the terms of the MIT License. */ -//! super block, mounting, etc. +//! superblock, mounting, etc. #include "Debug.h" @@ -73,7 +73,7 @@ DeviceOpener::~DeviceOpener() } -int +int DeviceOpener::Open(const char *device, int mode) { fDevice = open(device, mode); @@ -93,7 +93,7 @@ DeviceOpener::InitCache(off_t numBlocks) } -void +void DeviceOpener::RemoveCache(int mode) { if (!fCached) @@ -104,7 +104,7 @@ DeviceOpener::RemoveCache(int mode) } -void +void DeviceOpener::Keep() { fDevice = -1; @@ -115,7 +115,7 @@ DeviceOpener::Keep() * to compute the size, or fstat() if that failed. */ -status_t +status_t DeviceOpener::GetSize(off_t *_size, uint32 *_blockSize) { device_geometry geometry; @@ -257,7 +257,7 @@ Volume::IsValidSuperBlock() } -void +void Volume::Panic() { FATAL(("we have to panic... switch to read-only mode!\n")); @@ -313,13 +313,13 @@ Volume::Mount(const char *deviceName, uint32 flags) } #endif - // read the super block + // read the superblock if (Identify(fDevice, &fSuperBlock) != B_OK) { - FATAL(("invalid super block!\n")); + FATAL(("invalid superblock!\n")); return B_BAD_VALUE; } - // initialize short hands to the super block (to save byte swapping) + // initialize short hands to the superblock (to save byte swapping) fBlockSize = fSuperBlock.BlockSize(); fBlockShift = fSuperBlock.BlockShift(); fAllocationGroupShift = fSuperBlock.AllocationGroupShift(); @@ -409,7 +409,7 @@ Volume::Unmount() } -status_t +status_t Volume::Sync() { return fJournal->FlushLogAndBlocks(); @@ -431,7 +431,7 @@ Volume::ValidateBlockRun(block_run run) } -block_run +block_run Volume::ToBlockRun(off_t block) const { block_run run; @@ -456,14 +456,14 @@ Volume::CreateIndicesRoot(Transaction *transaction) } -status_t +status_t Volume::AllocateForInode(Transaction *transaction, const Inode *parent, mode_t type, block_run &run) { return fBlockAllocator.AllocateForInode(transaction, &parent->BlockRun(), type, run); } -status_t +status_t Volume::WriteSuperBlock() { if (write_pos(fDevice, 512, &fSuperBlock, sizeof(disk_super_block)) != sizeof(disk_super_block)) @@ -494,7 +494,7 @@ Volume::UpdateLiveQueries(Inode *inode, const char *attribute, int32 type, const * the queries - it wouldn't safe you anything in this case. */ -bool +bool Volume::CheckForLiveQuery(const char *attribute) { // ToDo: check for a live query that depends on the specified attribute @@ -502,7 +502,7 @@ Volume::CheckForLiveQuery(const char *attribute) } -void +void Volume::AddQuery(Query *query) { if (fQueryLock.Lock() < B_OK) @@ -514,7 +514,7 @@ Volume::AddQuery(Query *query) } -void +void Volume::RemoveQuery(Query *query) { if (fQueryLock.Lock() < B_OK) @@ -537,7 +537,7 @@ Volume::Identify(int fd, disk_super_block *superBlock) if (read_pos(fd, 0, buffer, sizeof(buffer)) != sizeof(buffer)) return B_IO_ERROR; - // Note: that does work only for x86, for PowerPC, the super block + // Note: that does work only for x86, for PowerPC, the superblock // may be located at offset 0! memcpy(superBlock, buffer + 512, sizeof(disk_super_block)); if (!superBlock->IsValid()) { @@ -583,11 +583,11 @@ Volume::Initialize(const char *device, const char *name, uint32 blockSize, uint3 off_t numBlocks = deviceSize / blockSize; - // create valid super block + // create valid superblock fSuperBlock.Initialize(name, numBlocks, blockSize); - - // initialize short hands to the super block (to save byte swapping) + + // initialize short hands to the superblock (to save byte swapping) fBlockSize = fSuperBlock.BlockSize(); fBlockShift = fSuperBlock.BlockShift(); fAllocationGroupShift = fSuperBlock.AllocationGroupShift(); diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/mount.c b/src/tests/add-ons/kernel/file_systems/fs_shell/mount.c index 6f8e4b7..9ab66ca 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/mount.c +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/mount.c @@ -1,8 +1,8 @@ /* This file contains the code that will create a file system, mount a file system and unmount a file system. - - THIS CODE COPYRIGHT DOMINIC GIAMPAOLO. NO WARRANTY IS EXPRESSED + + THIS CODE COPYRIGHT DOMINIC GIAMPAOLO. NO WARRANTY IS EXPRESSED OR IMPLIED. YOU MAY USE THIS CODE AND FREELY DISTRIBUTE IT FOR NON-COMMERCIAL USE AS LONG AS THIS NOTICE REMAINS ATTACHED. @@ -62,7 +62,7 @@ myfs_create_fs(char *device, char *name, int block_size, char *opts) printf("block_size %d is not a power of two!\n", block_size); return NULL; } - + myfs = (myfs_info *)calloc(1, sizeof(myfs_info)); if (myfs == NULL) { @@ -73,7 +73,7 @@ myfs_create_fs(char *device, char *name, int block_size, char *opts) myfs->fd = -1; myfs->nsid = (nspace_id)myfs; /* we can only do this when creating */ - + myfs->dsb.magic1 = SUPER_BLOCK_MAGIC1; myfs->dsb.magic2 = SUPER_BLOCK_MAGIC2; myfs->dsb.magic3 = SUPER_BLOCK_MAGIC3; @@ -84,7 +84,7 @@ myfs_create_fs(char *device, char *name, int block_size, char *opts) printf("can't create semaphore!\n"); goto cleanup; } - + myfs->fd = open(device, O_RDWR); if (myfs->fd < 0) { @@ -126,7 +126,7 @@ myfs_create_fs(char *device, char *name, int block_size, char *opts) printf("create storage map failed\n"); goto cleanup; } - + if (myfs_create_inodes(myfs) != 0) { printf("create inodes failed\n"); goto cleanup; @@ -150,7 +150,7 @@ myfs_create_fs(char *device, char *name, int block_size, char *opts) printf("creating superblock failed\n"); goto cleanup; } - + return myfs; @@ -174,7 +174,7 @@ cleanup: delete_sem(myfs->sem); free(myfs); - } + } return NULL; @@ -191,13 +191,13 @@ super_block_is_sane(myfs_info *myfs) myfs->dsb.magic2 != SUPER_BLOCK_MAGIC2 || myfs->dsb.magic3 != SUPER_BLOCK_MAGIC3) { - printf("warning: super block magic numbers are wrong:\n"); + printf("warning: superblock magic numbers are wrong:\n"); printf("0x%x (0x%x) 0x%x (0x%x) 0x%x (0x%x)\n", myfs->dsb.magic1, SUPER_BLOCK_MAGIC1, myfs->dsb.magic2, SUPER_BLOCK_MAGIC2, myfs->dsb.magic3, SUPER_BLOCK_MAGIC3); return 0; - + } if ((myfs->dsb.block_size % myfs->dev_block_size) != 0) { @@ -214,7 +214,7 @@ super_block_is_sane(myfs_info *myfs) return 0; } - /* make sure that the partition is as big as the super block + /* make sure that the partition is as big as the superblock says it is */ num_dev_blocks = get_num_device_blocks(myfs->fd); if (myfs->dsb.num_blocks * myfs->dsb.block_size > @@ -227,7 +227,7 @@ super_block_is_sane(myfs_info *myfs) if (myfs->dsb.block_size != (1 << myfs->dsb.block_shift)) { int i; - + printf("warning: block_shift %d does not match block size %d\n", myfs->dsb.block_shift, myfs->dsb.block_size); @@ -279,7 +279,7 @@ myfs_mount(nspace_id nsid, const char *device, ulong flags, ret = ENOMEM; goto error0; } - + myfs->fd = open(device, oflags); if (myfs->fd < 0) { printf("could not open %s to try and mount a myfs\n", device); @@ -288,13 +288,13 @@ myfs_mount(nspace_id nsid, const char *device, ulong flags, } if (read_super_block(myfs) != 0) { - printf("could not read super block on device %s\n", device); + printf("could not read superblock on device %s\n", device); ret = EBADF; goto error2; } - + if (super_block_is_sane(myfs) == 0) { - printf("bad super block\n"); + printf("bad superblock\n"); ret = EBADF; goto error2; } @@ -377,15 +377,15 @@ myfs_mount(nspace_id nsid, const char *device, ulong flags, /* note that the order in which things are done here is *very* important. don't mess with it unless you know what you're doing -*/ +*/ int myfs_unmount(void *ns) { myfs_info *myfs = (myfs_info *)ns; - + if (myfs == NULL) return EINVAL; - + sync_journal(myfs); myfs_shutdown_storage_map(myfs); @@ -405,7 +405,7 @@ myfs_unmount(void *ns) shutdown_tmp_blocks(myfs); close(myfs->fd); - + if (myfs->sem > 0) delete_sem(myfs->sem);