-
From 66b33390a3ddb22c6840abf87bc3603c215f4b56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Przemys=C5=82aw=20Buczkowski?= <przemub@yahoo.pl>
Date: Wed, 14 Nov 2012 10:48:33 +0100
Subject: [PATCH 229/509] Fix typos: super block -> superblock (#8974)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Przemysław Buczkowski <przemub@yahoo.pl>
---
docs/develop/kernel/boot/boot_process_specs_x86.html | 4 ++--
docs/userguide/en/applications/list-cli-apps.html | 2 +-
docs/userguide/es/applications/list-cli-apps.html | 2 +-
docs/userguide/it/applications/list-cli-apps.html | 2 +-
docs/userguide/pt_PT/applications/list-cli-apps.html | 2 +-
docs/userguide/sv_SE/applications/list-cli-apps.html | 2 +-
docs/userguide/uk/applications/list-cli-apps.html | 2 +-
src/add-ons/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 | 2 +-
src/add-ons/kernel/file_systems/ext2/Volume.cpp | 8 ++++----
src/add-ons/kernel/file_systems/reiserfs/SuperBlock.cpp | 8 ++++----
src/add-ons/kernel/file_systems/reiserfs/Volume.cpp | 10 +++++-----
src/add-ons/kernel/file_systems/reiserfs/reiserfs.h | 4 ++--
src/add-ons/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 | 2 +-
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 ++--
.../kernel/file_systems/bfs/dump_log/dump_log.cpp | 6 +++---
.../kernel/file_systems/bfs/fragmenter/fragmenter.cpp | 8 ++++----
.../kernel/file_systems/bfs/r5/BlockAllocator.cpp | 2 +-
src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp | 2 +-
src/tests/add-ons/kernel/file_systems/bfs/r5/Journal.cpp | 6 +++---
src/tests/add-ons/kernel/file_systems/bfs/r5/ToDo | 2 +-
src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp | 14 +++++++-------
src/tests/add-ons/kernel/file_systems/fs_shell/mount.c | 8 ++++----
.../userlandfs/r5/src/test/reiserfs/SuperBlock.cpp | 8 ++++----
.../userlandfs/r5/src/test/reiserfs/Volume.cpp | 8 ++++----
.../userlandfs/r5/src/test/reiserfs/reiserfs.h | 4 ++--
.../kernel/file_systems/userlandfs/r5/userlandfs.sample | 2 +-
.../system/kernel/file_corruption/fs/BlockAllocator.cpp | 2 +-
src/tests/system/kernel/file_corruption/fs/Volume.cpp | 4 ++--
45 files changed, 109 insertions(+), 109 deletions(-)
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
|
b
|
|
28 | 28 | </p> |
29 | 29 | <p> |
30 | 30 | It resides in the first first 1024 bytes of a BFS disk which usually refers to the |
31 | | first two sectors of the partition in question. Since the BFS super block is located |
| 31 | first two sectors of the partition in question. Since the BFS superblock is located |
32 | 32 | at byte offset 512, and about 170 bytes large, this section is already reserved, |
33 | 33 | and thus cannot be used by the loader itself.<br> |
34 | 34 | The MBR only loads the first sector of a partition into memory, so it has to load |
35 | | the super block (and the rest of its implementation) by itself. |
| 35 | the superblock (and the rest of its implementation) by itself. |
36 | 36 | </p> |
37 | 37 | <p> |
38 | 38 | The loader must be able to load the real boot loader from a certain path, and |
-
diff --git a/docs/userguide/en/applications/list-cli-apps.html b/docs/userguide/en/applications/list-cli-apps.html
index 2540278..bc2c027 100644
a
|
b
|
Here's a list of all commandline applications that are shipped with Haiku. Each
|
276 | 276 | <tr><td><tt>stty</tt></td><td> </td><td>Shows/sets terminal characteristics. </td></tr> |
277 | 277 | <tr><td><tt>su</tt></td><td> </td><td>Changes the effective user id and group. </td></tr> |
278 | 278 | <tr><td><tt>sum</tt></td><td> </td><td>Prints checksum and block counts for each file. </td></tr> |
279 | | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the super block. </td></tr> |
| 279 | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the superblock. </td></tr> |
280 | 280 | <tr><td><tt>sysinfo</tt></td><td> </td><td>Shows system info. </td></tr> |
281 | 281 | <tr><td colspan="3"><a id="T" name="T"><h2><a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>T</h2></a></td></tr> |
282 | 282 | <tr><td><tt>tac</tt></td><td> </td><td>Concatenates and prints files, last line first. </td></tr> |
-
diff --git a/docs/userguide/es/applications/list-cli-apps.html b/docs/userguide/es/applications/list-cli-apps.html
index 70c1f21..5ef7836 100644
a
|
b
|
Here's a list of all commandline applications that are shipped with Haiku. Each
|
277 | 277 | <tr><td><tt>stty</tt></td><td> </td><td>Shows/sets terminal characteristics. </td></tr> |
278 | 278 | <tr><td><tt>su</tt></td><td> </td><td>Changes the effective user id and group. </td></tr> |
279 | 279 | <tr><td><tt>sum</tt></td><td> </td><td>Prints checksum and block counts for each file. </td></tr> |
280 | | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the super block. </td></tr> |
| 280 | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the superblock. </td></tr> |
281 | 281 | <tr><td><tt>sysinfo</tt></td><td> </td><td>Shows system info. </td></tr> |
282 | 282 | <tr><td colspan="3"><a id="T" name="T"><h2><a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>T</h2></a></td></tr> |
283 | 283 | <tr><td><tt>tac</tt></td><td> </td><td>Concatenates and prints files, last line first. </td></tr> |
-
diff --git a/docs/userguide/it/applications/list-cli-apps.html b/docs/userguide/it/applications/list-cli-apps.html
index b3a35ed..774905a 100644
a
|
b
|
Qui a seguire è presentata una lista di tutte le applicazioni su riga di comand
|
281 | 281 | <tr><td><tt>stty</tt></td><td> </td><td>Visualizza o imposta le caratteristiche del terminale.</td></tr> |
282 | 282 | <tr><td><tt>su</tt></td><td> </td><td>Cambia l'effettivo user id e il gruppo.</td></tr> |
283 | 283 | <tr><td><tt>sum</tt></td><td> </td><td>Stampa il checksum e il block count per ciascun file.</td></tr> |
284 | | <tr><td><tt>sync</tt></td><td> </td><td>Forza i blocchi modificati ad essere scritti sul disco, aggiorna il super block.</td></tr> |
| 284 | <tr><td><tt>sync</tt></td><td> </td><td>Forza i blocchi modificati ad essere scritti sul disco, aggiorna il superblock.</td></tr> |
285 | 285 | <tr><td><tt>sysinfo</tt></td><td> </td><td>Mostra informazioni sul sistema.</td></tr> |
286 | 286 | <tr><td colspan="3"><a id="T" name="T"><h2><a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>T</h2></a></td></tr> |
287 | 287 | <tr><td><tt>tac</tt></td><td> </td><td>Concatena e stampa file, comincia dall'ultima riga.</td></tr> |
-
diff --git a/docs/userguide/pt_PT/applications/list-cli-apps.html b/docs/userguide/pt_PT/applications/list-cli-apps.html
index bc08295..946e016 100644
a
|
b
|
Here's a list of all commandline applications that are shipped with Haiku. Each
|
277 | 277 | <tr><td><tt>stty</tt></td><td> </td><td>Shows/sets terminal characteristics. </td></tr> |
278 | 278 | <tr><td><tt>su</tt></td><td> </td><td>Changes the effective user id and group. </td></tr> |
279 | 279 | <tr><td><tt>sum</tt></td><td> </td><td>Prints checksum and block counts for each file. </td></tr> |
280 | | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the super block. </td></tr> |
| 280 | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the superblock. </td></tr> |
281 | 281 | <tr><td><tt>sysinfo</tt></td><td> </td><td>Shows system info. </td></tr> |
282 | 282 | <tr><td colspan="3"><a id="T" name="T"><h2><a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>T</h2></a></td></tr> |
283 | 283 | <tr><td><tt>tac</tt></td><td> </td><td>Concatenates and prints files, last line first. </td></tr> |
-
diff --git a/docs/userguide/sv_SE/applications/list-cli-apps.html b/docs/userguide/sv_SE/applications/list-cli-apps.html
index cb91645..38d64f2 100644
a
|
b
|
Here's a list of all commandline applications that are shipped with Haiku. Each
|
280 | 280 | <tr><td><tt>stty</tt></td><td> </td><td>Shows/sets terminal characteristics. </td></tr> |
281 | 281 | <tr><td><tt>su</tt></td><td> </td><td>Changes the effective user id and group. </td></tr> |
282 | 282 | <tr><td><tt>sum</tt></td><td> </td><td>Prints checksum and block counts for each file. </td></tr> |
283 | | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the super block. </td></tr> |
| 283 | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the superblock. </td></tr> |
284 | 284 | <tr><td><tt>sysinfo</tt></td><td> </td><td>Shows system info. </td></tr> |
285 | 285 | <tr><td colspan="3"><a id="T" name="T"><h2><a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>T</h2></a></td></tr> |
286 | 286 | <tr><td><tt>tac</tt></td><td> </td><td>Concatenates and prints files, last line first. </td></tr> |
-
diff --git a/docs/userguide/uk/applications/list-cli-apps.html b/docs/userguide/uk/applications/list-cli-apps.html
index fdf7f1f..61b96ae 100644
a
|
b
|
Here's a list of all commandline applications that are shipped with Haiku. Each
|
277 | 277 | <tr><td><tt>stty</tt></td><td> </td><td>Shows/sets terminal characteristics. </td></tr> |
278 | 278 | <tr><td><tt>su</tt></td><td> </td><td>Changes the effective user id and group. </td></tr> |
279 | 279 | <tr><td><tt>sum</tt></td><td> </td><td>Prints checksum and block counts for each file. </td></tr> |
280 | | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the super block. </td></tr> |
| 280 | <tr><td><tt>sync</tt></td><td> </td><td>Forces changed blocks to disk, updates the superblock. </td></tr> |
281 | 281 | <tr><td><tt>sysinfo</tt></td><td> </td><td>Shows system info. </td></tr> |
282 | 282 | <tr><td colspan="3"><a id="T" name="T"><h2><a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>T</h2></a></td></tr> |
283 | 283 | <tr><td><tt>tac</tt></td><td> </td><td>Concatenates and prints files, last line first. </td></tr> |
-
diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
index 2b0baac..43a1dd6 100644
a
|
b
|
BlockAllocator::InitializeAndClearBitmap(Transaction& transaction)
|
597 | 597 | memset(buffer, 0, numBits >> 3); |
598 | 598 | |
599 | 599 | off_t offset = 1; |
600 | | // the bitmap starts directly after the super block |
| 600 | // the bitmap starts directly after the superblock |
601 | 601 | |
602 | 602 | // initialize the AllocationGroup objects and clear the on-disk bitmap |
603 | 603 | |
… |
… |
BlockAllocator::AllocateBlocks(Transaction& transaction, int32 groupIndex,
|
926 | 926 | |
927 | 927 | fVolume->SuperBlock().used_blocks |
928 | 928 | = HOST_ENDIAN_TO_BFS_INT64(fVolume->UsedBlocks() + bestLength); |
929 | | // We are not writing back the disk's super block - it's |
| 929 | // We are not writing back the disk's superblock - it's |
930 | 930 | // either done by the journaling code, or when the disk |
931 | 931 | // is unmounted. |
932 | 932 | // 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
|
b
|
Inode::Remove(Transaction& transaction, const char* name, ino_t* _id,
|
2556 | 2556 | adds the created inode to that parent directory. If an attribute directory |
2557 | 2557 | is created, it will also automatically be added to the \a parent inode as |
2558 | 2558 | such. However, the indices root node, and the regular root node won't be |
2559 | | added to the super block. |
| 2559 | added to the superblock. |
2560 | 2560 | It will also create the initial B+tree for the inode if it's a directory |
2561 | 2561 | of any kind. |
2562 | 2562 | \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 473ad28..91db4c4 100644
a
|
b
|
Journal::_ReplayRunArray(int32* _start)
|
499 | 499 | // TODO: eventually check other well known offsets, like the |
500 | 500 | // root and index dirs |
501 | 501 | if (offset == 0) { |
502 | | // This log entry writes over the super block - check if |
| 502 | // This log entry writes over the superblock - check if |
503 | 503 | // it's valid! |
504 | 504 | if (Volume::CheckSuperBlock(data) != B_OK) { |
505 | | FATAL(("Log contains invalid super block!\n")); |
| 505 | FATAL(("Log contains invalid superblock!\n")); |
506 | 506 | RETURN_ERROR(B_BAD_DATA); |
507 | 507 | } |
508 | 508 | } |
… |
… |
Journal::_TransactionWritten(int32 transactionID, int32 event, void* _logEntry)
|
663 | 663 | |
664 | 664 | delete logEntry; |
665 | 665 | |
666 | | // update the super block, and change the disk's state, if necessary |
| 666 | // update the superblock, and change the disk's state, if necessary |
667 | 667 | |
668 | 668 | if (update) { |
669 | 669 | if (superBlock.log_start == superBlock.log_end) |
… |
… |
Journal::_TransactionWritten(int32 transactionID, int32 event, void* _logEntry)
|
671 | 671 | |
672 | 672 | status_t status = journal->fVolume->WriteSuperBlock(); |
673 | 673 | if (status != B_OK) { |
674 | | FATAL(("_TransactionWritten: could not write back super block: %s\n", |
| 674 | FATAL(("_TransactionWritten: could not write back superblock: %s\n", |
675 | 675 | strerror(status))); |
676 | 676 | } |
677 | 677 | |
… |
… |
Journal::_WriteTransactionToLog()
|
864 | 864 | logEntry->SetTransactionID(fTransactionID); |
865 | 865 | #endif |
866 | 866 | |
867 | | // Update the log end pointer in the super block |
| 867 | // Update the log end pointer in the superblock |
868 | 868 | |
869 | 869 | fVolume->SuperBlock().flags = SUPER_BLOCK_DISK_DIRTY; |
870 | 870 | 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
|
b
|
|
4 | 4 | */ |
5 | 5 | |
6 | 6 | |
7 | | //! super block, mounting, etc. |
| 7 | //! superblock, mounting, etc. |
8 | 8 | |
9 | 9 | |
10 | 10 | #include "Attribute.h" |
… |
… |
Volume::Mount(const char* deviceName, uint32 flags)
|
342 | 342 | if (opener.IsReadOnly()) |
343 | 343 | fFlags |= VOLUME_READ_ONLY; |
344 | 344 | |
345 | | // read the super block |
| 345 | // read the superblock |
346 | 346 | if (Identify(fDevice, &fSuperBlock) != B_OK) { |
347 | | FATAL(("invalid super block!\n")); |
| 347 | FATAL(("invalid superblock!\n")); |
348 | 348 | return B_BAD_VALUE; |
349 | 349 | } |
350 | 350 | |
351 | | // initialize short hands to the super block (to save byte swapping) |
| 351 | // initialize short hands to the superblock (to save byte swapping) |
352 | 352 | fBlockSize = fSuperBlock.BlockSize(); |
353 | 353 | fBlockShift = fSuperBlock.BlockShift(); |
354 | 354 | fAllocationGroupShift = fSuperBlock.AllocationGroupShift(); |
… |
… |
Volume::CheckSuperBlock(const uint8* data, uint32* _offset)
|
633 | 633 | } |
634 | 634 | |
635 | 635 | #ifndef BFS_LITTLE_ENDIAN_ONLY |
636 | | // For PPC, the super block might be located at offset 0 |
| 636 | // For PPC, the superblock might be located at offset 0 |
637 | 637 | superBlock = (disk_super_block*)data; |
638 | 638 | if (superBlock->IsValid()) { |
639 | 639 | if (_offset != NULL) |
… |
… |
Volume::Initialize(int fd, const char* name, uint32 blockSize,
|
692 | 692 | |
693 | 693 | off_t numBlocks = deviceSize / blockSize; |
694 | 694 | |
695 | | // create valid super block |
| 695 | // create valid superblock |
696 | 696 | |
697 | 697 | fSuperBlock.Initialize(name, numBlocks, blockSize); |
698 | 698 | |
699 | | // initialize short hands to the super block (to save byte swapping) |
| 699 | // initialize short hands to the superblock (to save byte swapping) |
700 | 700 | fBlockSize = fSuperBlock.BlockSize(); |
701 | 701 | fBlockShift = fSuperBlock.BlockShift(); |
702 | 702 | 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
|
b
|
|
5 | 5 | */ |
6 | 6 | |
7 | 7 | |
8 | | //! Super block, mounting, etc. |
| 8 | //! Superblock, mounting, etc. |
9 | 9 | |
10 | 10 | |
11 | 11 | #include "Volume.h" |
… |
… |
Volume::Mount(const char* deviceName, uint32 flags)
|
270 | 270 | if (opener.IsReadOnly()) |
271 | 271 | fFlags |= VOLUME_READ_ONLY; |
272 | 272 | |
273 | | // read the super block |
| 273 | // read the superblock |
274 | 274 | status_t status = Identify(fDevice, &fSuperBlock); |
275 | 275 | if (status != B_OK) { |
276 | 276 | ERROR("Volume::Mount(): Identify() failed\n"); |
… |
… |
Volume::Identify(int fd, btrfs_super_block* superBlock)
|
526 | 526 | return B_IO_ERROR; |
527 | 527 | |
528 | 528 | if (!superBlock->IsValid()) { |
529 | | ERROR("invalid super block!\n"); |
| 529 | ERROR("invalid superblock!\n"); |
530 | 530 | return B_BAD_VALUE; |
531 | 531 | } |
532 | 532 | |
-
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
|
b
|
|
5 | 5 | */ |
6 | 6 | |
7 | 7 | |
8 | | //! Super block, mounting, etc. |
| 8 | //! Superblock, mounting, etc. |
9 | 9 | |
10 | 10 | |
11 | 11 | #include "Volume.h" |
… |
… |
Volume::Mount(const char* deviceName, uint32 flags)
|
310 | 310 | if (opener.IsReadOnly()) |
311 | 311 | fFlags |= VOLUME_READ_ONLY; |
312 | 312 | |
313 | | // read the super block |
| 313 | // read the superblock |
314 | 314 | status_t status = Identify(fDevice, &fSuperBlock); |
315 | 315 | if (status != B_OK) { |
316 | 316 | ERROR("Volume::Mount(): Identify() failed\n"); |
… |
… |
Volume::Identify(int fd, exfat_super_block* superBlock)
|
502 | 502 | return B_IO_ERROR; |
503 | 503 | |
504 | 504 | if (!superBlock->IsValid()) { |
505 | | ERROR("invalid super block!\n"); |
| 505 | ERROR("invalid superblock!\n"); |
506 | 506 | return B_BAD_VALUE; |
507 | 507 | } |
508 | 508 | |
-
diff --git a/src/add-ons/kernel/file_systems/ext2/Journal.cpp b/src/add-ons/kernel/file_systems/ext2/Journal.cpp
index d7f2d4c..e2094ac 100644
a
|
b
|
Journal::_LoadSuperBlock()
|
702 | 702 | if (status != B_OK) |
703 | 703 | return status; |
704 | 704 | |
705 | | TRACE("Journal::_LoadSuperBlock(): super block physical block: %llu\n", |
| 705 | TRACE("Journal::_LoadSuperBlock(): superblock physical block: %llu\n", |
706 | 706 | superblockPos); |
707 | 707 | |
708 | 708 | JournalSuperBlock superblock; |
-
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
|
b
|
|
5 | 5 | */ |
6 | 6 | |
7 | 7 | |
8 | | //! Super block, mounting, etc. |
| 8 | //! Superblock, mounting, etc. |
9 | 9 | |
10 | 10 | |
11 | 11 | #include "Volume.h" |
… |
… |
Volume::Mount(const char* deviceName, uint32 flags)
|
300 | 300 | fSuperBlock.CompatibleFeatures(), fSuperBlock.IncompatibleFeatures(), |
301 | 301 | fSuperBlock.ReadOnlyFeatures()); |
302 | 302 | |
303 | | // read the super block |
| 303 | // read the superblock |
304 | 304 | status_t status = Identify(fDevice, &fSuperBlock); |
305 | 305 | if (status != B_OK) { |
306 | 306 | FATAL("Volume::Mount(): Identify() failed\n"); |
… |
… |
Volume::Mount(const char* deviceName, uint32 flags)
|
311 | 311 | if (!IsReadOnly() && _UnsupportedReadOnlyFeatures(fSuperBlock) != 0) |
312 | 312 | return B_UNSUPPORTED; |
313 | 313 | |
314 | | // initialize short hands to the super block (to save byte swapping) |
| 314 | // initialize short hands to the superblock (to save byte swapping) |
315 | 315 | fBlockShift = fSuperBlock.BlockShift(); |
316 | 316 | if (fBlockShift < 10 || fBlockShift > 16) |
317 | 317 | return B_ERROR; |
… |
… |
Volume::Identify(int fd, ext2_super_block* superBlock)
|
930 | 930 | return B_IO_ERROR; |
931 | 931 | |
932 | 932 | if (!superBlock->IsValid()) { |
933 | | FATAL("invalid super block!\n"); |
| 933 | FATAL("invalid superblock!\n"); |
934 | 934 | return B_BAD_VALUE; |
935 | 935 | } |
936 | 936 | |
-
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
|
b
|
using std::nothrow;
|
30 | 30 | |
31 | 31 | /*! |
32 | 32 | \class DirEntry |
33 | | \brief Represents the on-disk structure for super block of the FS. |
| 33 | \brief Represents the on-disk structure for superblock of the FS. |
34 | 34 | |
35 | 35 | There exist two versions of the structure and this class can deal with both |
36 | 36 | of them. This class can also handle a very old layout that puts the super |
37 | 37 | block in a different location. The Init() methods tries to find and read |
38 | | the super block from disk. |
| 38 | the superblock from disk. |
39 | 39 | */ |
40 | 40 | |
41 | 41 | // read_super_block |
… |
… |
read_super_block(int device, off_t offset, const char *magic,
|
47 | 47 | { |
48 | 48 | super_block_t *superBlock = NULL; |
49 | 49 | status_t error = B_OK; |
50 | | // allocate memory for the super block |
| 50 | // allocate memory for the superblock |
51 | 51 | if (error == B_OK) { |
52 | 52 | superBlock = new(nothrow) super_block_t; |
53 | 53 | if (!superBlock) |
54 | 54 | error = B_NO_MEMORY; |
55 | 55 | } |
56 | | // read the super block |
| 56 | // read the superblock |
57 | 57 | if (error == B_OK) { |
58 | 58 | size_t size = sizeof(super_block_t); |
59 | 59 | 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
|
b
|
static inline C max(const C &a, const C &b) { return (a > b ? a : b); }
|
57 | 57 | \brief Represents a volume. |
58 | 58 | |
59 | 59 | The Volume class bundles all functionality related to a volume. |
60 | | It knows the super block and has some basic functionality needed |
| 60 | It knows the superblock and has some basic functionality needed |
61 | 61 | for handling VNodes. Actually it should be the layer that provides the |
62 | 62 | abstraction from VNodes. The design is not strict in this respect |
63 | 63 | (the whole thing evolved while I was in the process of understanding |
… |
… |
Volume::Identify(int fd, partition_data *partition)
|
97 | 97 | if (fDevice < 0) |
98 | 98 | return B_ERROR; |
99 | 99 | |
100 | | // read and analyze super block |
| 100 | // read and analyze superblock |
101 | 101 | return _ReadSuperBlock(); |
102 | 102 | } |
103 | 103 | |
… |
… |
Volume::Mount(fs_volume *fsVolume, const char *path)
|
130 | 130 | if (fDevice < 0) |
131 | 131 | SET_ERROR(error, errno); |
132 | 132 | } |
133 | | // read and analyze super block |
| 133 | // read and analyze superblock |
134 | 134 | if (error == B_OK) |
135 | 135 | error = _ReadSuperBlock(); |
136 | 136 | |
… |
… |
Volume::_ReadSuperBlock()
|
534 | 534 | error = B_NO_MEMORY; |
535 | 535 | // check FS state |
536 | 536 | if (error == B_OK && fSuperBlock->GetState() != REISERFS_VALID_FS) { |
537 | | FATAL(("The super block indicates a non-valid FS! Bailing out.")); |
| 537 | FATAL(("The superblock indicates a non-valid FS! Bailing out.")); |
538 | 538 | error = B_ERROR; |
539 | 539 | } |
540 | 540 | // check FS version |
541 | 541 | if (error == B_OK && fSuperBlock->GetVersion() > REISERFS_VERSION_2) { |
542 | | FATAL(("The super block indicates a version greater than 2 (%u)! " |
| 542 | FATAL(("The superblock indicates a version greater than 2 (%u)! " |
543 | 543 | "Bailing out.", fSuperBlock->GetVersion())); |
544 | 544 | error = B_ERROR; |
545 | 545 | } |
-
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
|
b
|
struct reiserfs_de_head
|
220 | 220 | // |
221 | 221 | |
222 | 222 | // |
223 | | // super block's field values |
| 223 | // superblock's field values |
224 | 224 | // |
225 | 225 | #define REISERFS_VERSION_0 0 /* undistributed bitmap */ |
226 | 226 | #define REISERFS_VERSION_1 1 /* distributed bitmap and resizer*/ |
… |
… |
struct reiserfs_de_head
|
232 | 232 | #define R5_HASH 3 |
233 | 233 | #define DEFAULT_HASH R5_HASH |
234 | 234 | |
235 | | /* this is the on disk super block */ |
| 235 | /* this is the on disk superblock */ |
236 | 236 | |
237 | 237 | struct reiserfs_super_block |
238 | 238 | { |
-
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
|
b
|
file_system obfs {
|
39 | 39 | is_buffer false |
40 | 40 | } |
41 | 41 | |
42 | | # dump super block |
| 42 | # dump superblock |
43 | 43 | ioctl 56743 { |
44 | 44 | buffer_size 0 |
45 | 45 | 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
|
b
|
main(int argc, char **argv)
|
118 | 118 | if (argc < 2 || !strcmp(argv[1], "--help")) { |
119 | 119 | char *filename = strrchr(argv[0],'/'); |
120 | 120 | fprintf(stderr,"usage: %s [-srib] <device> [allocation_group start]\n" |
121 | | "\t-s\tdump super block\n" |
| 121 | "\t-s\tdump superblock\n" |
122 | 122 | "\t-r\tdump root node\n" |
123 | 123 | " the following options need the allocation_group/start " |
124 | 124 | "parameters:\n" |
… |
… |
main(int argc, char **argv)
|
214 | 214 | } |
215 | 215 | |
216 | 216 | if (disk.ValidateSuperBlock() < B_OK) { |
217 | | fprintf(stderr, "The disk's super block is corrupt (or it's not a BFS " |
| 217 | fprintf(stderr, "The disk's superblock is corrupt (or it's not a BFS " |
218 | 218 | "device)!\n"); |
219 | 219 | return 0; |
220 | 220 | } |
-
diff --git a/src/bin/bfs_tools/bfswhich.cpp b/src/bin/bfs_tools/bfswhich.cpp
index 973cdce..61b870a 100644
a
|
b
|
main(int argc, char** argv)
|
286 | 286 | } |
287 | 287 | |
288 | 288 | if (disk.ValidateSuperBlock() != B_OK) { |
289 | | fprintf(stderr, "The disk's super block is corrupt!\n"); |
| 289 | fprintf(stderr, "The disk's superblock is corrupt!\n"); |
290 | 290 | return -1; |
291 | 291 | } |
292 | 292 | |
… |
… |
main(int argc, char** argv)
|
307 | 307 | disk.Log().allocation_group, disk.Log().start, |
308 | 308 | disk.Log().length); |
309 | 309 | } else if (block < 1) { |
310 | | printf("Super Block intersects\n"); |
| 310 | printf("Superblock intersects\n"); |
311 | 311 | } else if (block < 1 + disk.BitmapSize()) { |
312 | 312 | printf("Block bitmap intersects (start %d, end %lu)\n", 1, |
313 | 313 | disk.BitmapSize()); |
-
diff --git a/src/bin/bfs_tools/chkindex.cpp b/src/bin/bfs_tools/chkindex.cpp
index e31a827..4659dff 100644
a
|
b
|
main(int argc,char **argv)
|
479 | 479 | |
480 | 480 | if (disk.ValidateSuperBlock() < B_OK) |
481 | 481 | { |
482 | | fprintf(stderr,"The disk's super block is corrupt!\n"); |
| 482 | fprintf(stderr,"The disk's superblock is corrupt!\n"); |
483 | 483 | return -1; |
484 | 484 | } |
485 | 485 | |
-
diff --git a/src/bin/bfs_tools/lib/Disk.cpp b/src/bin/bfs_tools/lib/Disk.cpp
index 1e2af9d..f83b00a 100644
a
|
b
|
|
2 | 2 | * Copyright (c) 2001-2008 pinc Software. All Rights Reserved. |
3 | 3 | */ |
4 | 4 | |
5 | | //! Handles BFS super block, disk access etc. |
| 5 | //! Handles BFS superblock, disk access etc. |
6 | 6 | |
7 | 7 | #include "Disk.h" |
8 | 8 | #include "dump.h" |
… |
… |
Disk::Disk(const char *deviceName, bool rawMode, off_t start, off_t stop)
|
155 | 155 | |
156 | 156 | if (fFile.ReadAt(512 + fRawDiskOffset, &fSuperBlock, |
157 | 157 | sizeof(disk_super_block)) < 1) |
158 | | fprintf(stderr,"Disk: Could not read super block\n"); |
| 158 | fprintf(stderr,"Disk: Could not read superblock\n"); |
159 | 159 | |
160 | 160 | //dump_super_block(&fSuperBlock); |
161 | 161 | } |
… |
… |
Disk::ScanForSuperBlock(off_t start, off_t stop)
|
274 | 274 | printf("\n(%ld) *** BFS superblock found at: %Ld\n",superBlocks.CountItems() + 1,offset); |
275 | 275 | dump_super_block(super); |
276 | 276 | |
277 | | // add a copy of the super block to the list |
| 277 | // add a copy of the superblock to the list |
278 | 278 | bfs_disk_info *info = (bfs_disk_info *)malloc(sizeof(bfs_disk_info)); |
279 | 279 | if (info == NULL) |
280 | 280 | return B_NO_MEMORY; |
281 | 281 | |
282 | 282 | memcpy(&info->super_block, super, sizeof(disk_super_block)); |
283 | 283 | info->offset = offset + i - 512; |
284 | | /* location off the BFS super block is 512 bytes after the partition start */ |
| 284 | /* location off the BFS superblock is 512 bytes after the partition start */ |
285 | 285 | superBlocks.AddItem(info); |
286 | 286 | } |
287 | 287 | } |
288 | 288 | } |
289 | 289 | |
290 | 290 | if (superBlocks.CountItems() == 0) { |
291 | | puts("\nCouldn't find any BFS super blocks!"); |
| 291 | puts("\nCouldn't find any BFS superblocks!"); |
292 | 292 | return B_ENTRY_NOT_FOUND; |
293 | 293 | } |
294 | 294 | |
… |
… |
Disk::RecreateSuperBlock()
|
408 | 408 | bfs_inode indexDir; |
409 | 409 | bfs_inode rootDir; |
410 | 410 | if (ScanForIndexAndRoot(&indexDir,&rootDir) < B_OK) { |
411 | | 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"); |
| 411 | 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"); |
412 | 412 | rootDir.inode_num.allocation_group = 8; |
413 | 413 | rootDir.inode_num.start = 0; |
414 | 414 | rootDir.inode_num.length = 1; |
-
diff --git a/src/bin/bfs_tools/lib/Disk.h b/src/bin/bfs_tools/lib/Disk.h
index d1e8997..d0615c6 100644
a
|
b
|
|
1 | 1 | #ifndef DISK_H |
2 | 2 | #define DISK_H |
3 | | /* Disk - handles BFS super block, disk access etc. |
| 3 | /* Disk - handles BFS superblock, disk access etc. |
4 | 4 | ** |
5 | 5 | ** Copyright (c) 2001-2003 pinc Software. All Rights Reserved. |
6 | 6 | */ |
-
diff --git a/src/bin/bfs_tools/recover.cpp b/src/bin/bfs_tools/recover.cpp
index 7a114ad..f818144 100644
a
|
b
|
usage(char *name)
|
669 | 669 | "\t-i\trecreate indices on target disk\n" |
670 | 670 | "\t-d\tdump missing and recreated i-nodes\n" |
671 | 671 | "\t-r\tdisk access in raw mode (use only if the partition table is invalid)\n" |
672 | | "\t-s\trecreate super block and exit (for experts only, don't use this\n" |
| 672 | "\t-s\trecreate superblock and exit (for experts only, don't use this\n" |
673 | 673 | "\t\tif you don't know what you're doing)\n" |
674 | 674 | "\t-v\tverbose output\n", name); |
675 | 675 | exit(-1); |
… |
… |
main(int argc, char **argv)
|
764 | 764 | bool recreatedSuperBlock = false; |
765 | 765 | |
766 | 766 | if (disk.ValidateSuperBlock() < B_OK) { |
767 | | fprintf(stderr, "The disk's super block is corrupt!\n"); |
| 767 | fprintf(stderr, "The disk's superblock is corrupt!\n"); |
768 | 768 | if (disk.RecreateSuperBlock() < B_OK) { |
769 | | fprintf(stderr, "Can't recreate the disk's super block, sorry!\n"); |
| 769 | fprintf(stderr, "Can't recreate the disk's superblock, sorry!\n"); |
770 | 770 | return -1; |
771 | 771 | } |
772 | 772 | recreatedSuperBlock = true; |
773 | 773 | } |
774 | 774 | if (gVerbose) { |
775 | | puts("\n*** The super block:\n"); |
| 775 | puts("\n*** The superblock:\n"); |
776 | 776 | dump_super_block(disk.SuperBlock()); |
777 | 777 | } |
778 | 778 | |
… |
… |
main(int argc, char **argv)
|
785 | 785 | status_t status = disk.WriteAt(512, disk.SuperBlock(), |
786 | 786 | sizeof(disk_super_block)); |
787 | 787 | if (status < B_OK) { |
788 | | fprintf(stderr, "Could not write super block: %s!\n", |
| 788 | fprintf(stderr, "Could not write superblock: %s!\n", |
789 | 789 | strerror(status)); |
790 | 790 | return 1; |
791 | 791 | } |
-
diff --git a/src/bin/coreutils/man/sync.1 b/src/bin/coreutils/man/sync.1
index ac69912..3c17ffe 100644
a
|
b
|
sync \- flush file system buffers
|
8 | 8 | .SH DESCRIPTION |
9 | 9 | .\" Add any additional description here |
10 | 10 | .PP |
11 | | Force changed blocks to disk, update the super block. |
| 11 | Force changed blocks to disk, update the superblock. |
12 | 12 | .TP |
13 | 13 | \fB\-\-help\fR |
14 | 14 | 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
|
b
|
|
1 | | /* sync - update the super block |
| 1 | /* sync - update the superblock |
2 | 2 | Copyright (C) 1994-2004, 2008-2010 Free Software Foundation, Inc. |
3 | 3 | |
4 | 4 | This program is free software: you can redistribute it and/or modify |
… |
… |
usage (int status)
|
40 | 40 | { |
41 | 41 | printf (_("Usage: %s [OPTION]\n"), program_name); |
42 | 42 | fputs (_("\ |
43 | | Force changed blocks to disk, update the super block.\n\ |
| 43 | Force changed blocks to disk, update the superblock.\n\ |
44 | 44 | \n\ |
45 | 45 | "), stdout); |
46 | 46 | 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
|
b
|
Volume::Volume(boot::Partition *partition)
|
54 | 54 | #endif |
55 | 55 | } |
56 | 56 | |
57 | | TRACE(("bfs: we do have a valid super block (name = %s)!\n", fSuperBlock.name)); |
| 57 | TRACE(("bfs: we do have a valid superblock (name = %s)!\n", fSuperBlock.name)); |
58 | 58 | |
59 | 59 | fRootNode = new(nothrow) BFS::Directory(*this, Root()); |
60 | 60 | if (fRootNode == NULL) |
-
diff --git a/src/system/boot/platform/atari_m68k/devices.cpp b/src/system/boot/platform/atari_m68k/devices.cpp
index 8abfa67..8c269ca 100644
a
|
b
|
fill_disk_identifier_v2(disk_identifier &disk, const drive_parameters ¶meter
|
317 | 317 | static off_t |
318 | 318 | get_next_check_sum_offset(int32 index, off_t maxSize) |
319 | 319 | { |
320 | | // The boot block often contains the disk super block, and should be |
| 320 | // The boot block often contains the disk superblock, and should be |
321 | 321 | // unique enough for most cases |
322 | 322 | if (index < 2) |
323 | 323 | return index * 512; |
-
diff --git a/src/system/boot/platform/bios_ia32/devices.cpp b/src/system/boot/platform/bios_ia32/devices.cpp
index a8cfd1b..e152741 100644
a
|
b
|
fill_disk_identifier_v2(disk_identifier &disk, const drive_parameters ¶meter
|
368 | 368 | static off_t |
369 | 369 | get_next_check_sum_offset(int32 index, off_t maxSize) |
370 | 370 | { |
371 | | // The boot block often contains the disk super block, and should be |
| 371 | // The boot block often contains the disk superblock, and should be |
372 | 372 | // unique enough for most cases |
373 | 373 | if (index < 2) |
374 | 374 | return index * 512; |
-
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
|
b
|
struc BlockRun
|
130 | 130 | .length resw 1 |
131 | 131 | endstruc |
132 | 132 | |
133 | | ; BFS super block |
| 133 | ; BFS superblock |
134 | 134 | struc SuperBlock |
135 | 135 | .name resb 32 |
136 | 136 | .magic1 resd 1 |
… |
… |
kBootBlockSignature dw 0xaa55
|
665 | 665 | |
666 | 666 | second_boot_block: |
667 | 667 | |
668 | | ; first comes the BFS super block |
| 668 | ; first comes the BFS superblock |
669 | 669 | superblock: |
670 | 670 | %rep sizeof(SuperBlock) |
671 | 671 | db 0 |
-
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
|
b
|
dumpLogEntry(int device, disk_super_block &superBlock, int32 &start, uint8 *bloc
|
147 | 147 | break; |
148 | 148 | |
149 | 149 | off_t value = array[arrayIndex]; |
150 | | printf("%7ld: %Ld%s\n", index, value, value == 0 ? " (super block)" : |
| 150 | printf("%7ld: %Ld%s\n", index, value, value == 0 ? " (superblock)" : |
151 | 151 | value < bitmapSize + 1 ? " (bitmap block)" : ""); |
152 | 152 | |
153 | 153 | if (data != NULL) { |
… |
… |
main(int argc, char **argv)
|
208 | 208 | |
209 | 209 | disk_super_block superBlock; |
210 | 210 | if (read_pos(device, 512, &superBlock, sizeof(disk_super_block)) < (ssize_t)sizeof(disk_super_block)) { |
211 | | fprintf(stderr, "%s: could not read super block.\n", sProgramName); |
| 211 | fprintf(stderr, "%s: could not read superblock.\n", sProgramName); |
212 | 212 | return -1; |
213 | 213 | } |
214 | 214 | |
215 | 215 | if (!superBlock.IsValid()) { |
216 | | fprintf(stderr, "%s: invalid super block!\n", sProgramName); |
| 216 | fprintf(stderr, "%s: invalid superblock!\n", sProgramName); |
217 | 217 | return -1; |
218 | 218 | } |
219 | 219 | |
-
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..ce5e819 100644
a
|
b
|
main(int argc, const char *const *argv)
|
151 | 151 | exit(1); |
152 | 152 | } |
153 | 153 | |
154 | | // read super block |
| 154 | // read superblock |
155 | 155 | disk_super_block superBlock; |
156 | 156 | read_from(fd, 512, &superBlock, sizeof(superBlock)); |
157 | 157 | |
158 | 158 | if (superBlock.magic1 != SUPER_BLOCK_MAGIC1) { |
159 | | fprintf(stderr, "Error: Bad super block magic. This is probably not a " |
| 159 | fprintf(stderr, "Error: Bad superblock magic. This is probably not a " |
160 | 160 | "BFS image.\n"); |
161 | 161 | exit(1); |
162 | 162 | } |
… |
… |
main(int argc, const char *const *argv)
|
172 | 172 | int64 blockCount = st.st_size / blockSize; |
173 | 173 | if (blockCount != superBlock.num_blocks) { |
174 | 174 | fprintf(stderr, "Error: Number of blocks in image and the number in " |
175 | | "the super block differ: %lld vs. %lld\n", blockCount, |
| 175 | "the superblock differ: %lld vs. %lld\n", blockCount, |
176 | 176 | superBlock.num_blocks); |
177 | 177 | exit(1); |
178 | 178 | } |
… |
… |
main(int argc, const char *const *argv)
|
206 | 206 | |
207 | 207 | printf("bfs_fragmenter: marked %lld blocks used\n", occupiedBlocks); |
208 | 208 | |
209 | | // write back the super block |
| 209 | // write back the superblock |
210 | 210 | superBlock.used_blocks += occupiedBlocks; |
211 | 211 | write_to(fd, 512, &superBlock, sizeof(superBlock)); |
212 | 212 | |
-
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
|
b
|
BlockAllocator::AllocateBlocks(Transaction *transaction, int32 group, uint16 sta
|
568 | 568 | |
569 | 569 | fVolume->SuperBlock().used_blocks = |
570 | 570 | HOST_ENDIAN_TO_BFS_INT64(fVolume->UsedBlocks() + numBlocks); |
571 | | // We are not writing back the disk's super block - it's |
| 571 | // We are not writing back the disk's superblock - it's |
572 | 572 | // either done by the journaling code, or when the disk |
573 | 573 | // is unmounted. |
574 | 574 | // 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
|
b
|
Inode::Remove(Transaction *transaction, const char *name, off_t *_id, bool isDir
|
1928 | 1928 | * adds the created inode to that parent directory. If an attribute directory |
1929 | 1929 | * is created, it will also automatically added to the parent inode as such. |
1930 | 1930 | * However, the indices root node, and the regular root node won't be added |
1931 | | * to the super block. |
| 1931 | * to the superblock. |
1932 | 1932 | * It will also create the initial B+tree for the inode if it's a directory |
1933 | 1933 | * of any kind. |
1934 | 1934 | * 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
|
b
|
Journal::blockNotify(off_t blockNumber, size_t numBlocks, void *arg)
|
307 | 307 | |
308 | 308 | free(logEntry); |
309 | 309 | |
310 | | // update the super block, and change the disk's state, if necessary |
| 310 | // update the superblock, and change the disk's state, if necessary |
311 | 311 | |
312 | 312 | if (update) { |
313 | 313 | journal->fVolume->LogStart() = superBlock.log_start; |
… |
… |
Journal::blockNotify(off_t blockNumber, size_t numBlocks, void *arg)
|
317 | 317 | |
318 | 318 | status_t status = journal->fVolume->WriteSuperBlock(); |
319 | 319 | if (status != B_OK) |
320 | | FATAL(("blockNotify: could not write back super block: %s\n", strerror(status))); |
| 320 | FATAL(("blockNotify: could not write back superblock: %s\n", strerror(status))); |
321 | 321 | } |
322 | 322 | } |
323 | 323 | |
… |
… |
Journal::WriteLogEntry()
|
421 | 421 | |
422 | 422 | fUsed += array->CountItems(); |
423 | 423 | |
424 | | // Update the log end pointer in the super block |
| 424 | // Update the log end pointer in the superblock |
425 | 425 | fVolume->SuperBlock().flags = HOST_ENDIAN_TO_BFS_INT32(SUPER_BLOCK_DISK_DIRTY); |
426 | 426 | fVolume->SuperBlock().log_end = HOST_ENDIAN_TO_BFS_INT64(logPosition); |
427 | 427 | 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
|
b
|
kernel_interface
|
76 | 76 | general stuff |
77 | 77 | |
78 | 78 | - There are also some comments with a leading "ToDo:" directly in the code which may not be mentioned here. |
79 | | - implement mkbfs (try to do it in OpenBeOS style directly - only write the super block from user space) |
| 79 | - implement mkbfs (try to do it in OpenBeOS style directly - only write the superblock from user space) |
80 | 80 | |
81 | 81 | |
82 | 82 | ----- |
-
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..765cc09 100644
a
|
b
|
|
3 | 3 | * This file may be used under the terms of the MIT License. |
4 | 4 | */ |
5 | 5 | |
6 | | //! super block, mounting, etc. |
| 6 | //! superblock, mounting, etc. |
7 | 7 | |
8 | 8 | |
9 | 9 | #include "Debug.h" |
… |
… |
Volume::Mount(const char *deviceName, uint32 flags)
|
313 | 313 | } |
314 | 314 | #endif |
315 | 315 | |
316 | | // read the super block |
| 316 | // read the superblock |
317 | 317 | if (Identify(fDevice, &fSuperBlock) != B_OK) { |
318 | | FATAL(("invalid super block!\n")); |
| 318 | FATAL(("invalid superblock!\n")); |
319 | 319 | return B_BAD_VALUE; |
320 | 320 | } |
321 | 321 | |
322 | | // initialize short hands to the super block (to save byte swapping) |
| 322 | // initialize short hands to the superblock (to save byte swapping) |
323 | 323 | fBlockSize = fSuperBlock.BlockSize(); |
324 | 324 | fBlockShift = fSuperBlock.BlockShift(); |
325 | 325 | fAllocationGroupShift = fSuperBlock.AllocationGroupShift(); |
… |
… |
Volume::Identify(int fd, disk_super_block *superBlock)
|
537 | 537 | if (read_pos(fd, 0, buffer, sizeof(buffer)) != sizeof(buffer)) |
538 | 538 | return B_IO_ERROR; |
539 | 539 | |
540 | | // Note: that does work only for x86, for PowerPC, the super block |
| 540 | // Note: that does work only for x86, for PowerPC, the superblock |
541 | 541 | // may be located at offset 0! |
542 | 542 | memcpy(superBlock, buffer + 512, sizeof(disk_super_block)); |
543 | 543 | if (!superBlock->IsValid()) { |
… |
… |
Volume::Initialize(const char *device, const char *name, uint32 blockSize, uint3
|
583 | 583 | |
584 | 584 | off_t numBlocks = deviceSize / blockSize; |
585 | 585 | |
586 | | // create valid super block |
| 586 | // create valid superblock |
587 | 587 | |
588 | 588 | fSuperBlock.Initialize(name, numBlocks, blockSize); |
589 | 589 | |
590 | | // initialize short hands to the super block (to save byte swapping) |
| 590 | // initialize short hands to the superblock (to save byte swapping) |
591 | 591 | fBlockSize = fSuperBlock.BlockSize(); |
592 | 592 | fBlockShift = fSuperBlock.BlockShift(); |
593 | 593 | 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..16fe17a 100644
a
|
b
|
super_block_is_sane(myfs_info *myfs)
|
191 | 191 | myfs->dsb.magic2 != SUPER_BLOCK_MAGIC2 || |
192 | 192 | myfs->dsb.magic3 != SUPER_BLOCK_MAGIC3) { |
193 | 193 | |
194 | | printf("warning: super block magic numbers are wrong:\n"); |
| 194 | printf("warning: superblock magic numbers are wrong:\n"); |
195 | 195 | printf("0x%x (0x%x) 0x%x (0x%x) 0x%x (0x%x)\n", |
196 | 196 | myfs->dsb.magic1, SUPER_BLOCK_MAGIC1, |
197 | 197 | myfs->dsb.magic2, SUPER_BLOCK_MAGIC2, |
… |
… |
super_block_is_sane(myfs_info *myfs)
|
214 | 214 | return 0; |
215 | 215 | } |
216 | 216 | |
217 | | /* make sure that the partition is as big as the super block |
| 217 | /* make sure that the partition is as big as the superblock |
218 | 218 | says it is */ |
219 | 219 | num_dev_blocks = get_num_device_blocks(myfs->fd); |
220 | 220 | if (myfs->dsb.num_blocks * myfs->dsb.block_size > |
… |
… |
myfs_mount(nspace_id nsid, const char *device, ulong flags,
|
288 | 288 | } |
289 | 289 | |
290 | 290 | if (read_super_block(myfs) != 0) { |
291 | | printf("could not read super block on device %s\n", device); |
| 291 | printf("could not read superblock on device %s\n", device); |
292 | 292 | ret = EBADF; |
293 | 293 | goto error2; |
294 | 294 | } |
295 | 295 | |
296 | 296 | if (super_block_is_sane(myfs) == 0) { |
297 | | printf("bad super block\n"); |
| 297 | printf("bad superblock\n"); |
298 | 298 | ret = EBADF; |
299 | 299 | goto error2; |
300 | 300 | } |
-
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
|
b
|
using std::nothrow;
|
30 | 30 | |
31 | 31 | /*! |
32 | 32 | \class DirEntry |
33 | | \brief Represents the on-disk structure for super block of the FS. |
| 33 | \brief Represents the on-disk structure for superblock of the FS. |
34 | 34 | |
35 | 35 | There exist two versions of the structure and this class can deal with |
36 | | both of them. The Init() methods tries to find and read the super block |
| 36 | both of them. The Init() methods tries to find and read the superblock |
37 | 37 | from disk. |
38 | 38 | */ |
39 | 39 | |
… |
… |
read_super_block(int device, off_t offset, const char *magic,
|
46 | 46 | { |
47 | 47 | super_block_t *superBlock = NULL; |
48 | 48 | status_t error = B_OK; |
49 | | // allocate memory for the super block |
| 49 | // allocate memory for the superblock |
50 | 50 | if (error == B_OK) { |
51 | 51 | superBlock = new(nothrow) super_block_t; |
52 | 52 | if (!superBlock) |
53 | 53 | error = B_NO_MEMORY; |
54 | 54 | } |
55 | | // read the super block |
| 55 | // read the superblock |
56 | 56 | if (error == B_OK) { |
57 | 57 | size_t size = sizeof(super_block_t); |
58 | 58 | 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
|
b
|
static inline C max(const C &a, const C &b) { return (a > b ? a : b); }
|
53 | 53 | \brief Represents a volume. |
54 | 54 | |
55 | 55 | The Volume class bundles all functionality related to a volume. |
56 | | It knows the super block and has some basic functionality needed |
| 56 | It knows the superblock and has some basic functionality needed |
57 | 57 | for handling VNodes. Actually it should be the layer that provides the |
58 | 58 | abstraction from VNodes. The design is not strict in this respect |
59 | 59 | (the whole thing evolved while I was in the process of understanding |
… |
… |
Volume::Mount(nspace_id id, const char *path)
|
111 | 111 | if (fDevice < 0) |
112 | 112 | SET_ERROR(error, errno); |
113 | 113 | } |
114 | | // read and analyze super block |
| 114 | // read and analyze superblock |
115 | 115 | if (error == B_OK) |
116 | 116 | error = _ReadSuperBlock(); |
117 | 117 | // create and init block cache |
… |
… |
Volume::_ReadSuperBlock()
|
497 | 497 | error = B_NO_MEMORY; |
498 | 498 | // check FS state |
499 | 499 | if (error == B_OK && fSuperBlock->GetState() != REISERFS_VALID_FS) { |
500 | | FATAL(("The super block indicates a non-valid FS! Bailing out.")); |
| 500 | FATAL(("The superblock indicates a non-valid FS! Bailing out.")); |
501 | 501 | error = B_ERROR; |
502 | 502 | } |
503 | 503 | // check FS version |
504 | 504 | if (error == B_OK && fSuperBlock->GetVersion() > REISERFS_VERSION_2) { |
505 | | FATAL(("The super block indicates a version greater than 2 (%u)! " |
| 505 | FATAL(("The superblock indicates a version greater than 2 (%u)! " |
506 | 506 | "Bailing out.", fSuperBlock->GetVersion())); |
507 | 507 | error = B_ERROR; |
508 | 508 | } |
-
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
|
b
|
struct reiserfs_de_head
|
220 | 220 | // |
221 | 221 | |
222 | 222 | // |
223 | | // super block's field values |
| 223 | // superblock's field values |
224 | 224 | // |
225 | 225 | #define REISERFS_VERSION_0 0 /* undistributed bitmap */ |
226 | 226 | #define REISERFS_VERSION_1 1 /* distributed bitmap and resizer*/ |
… |
… |
struct reiserfs_de_head
|
232 | 232 | #define R5_HASH 3 |
233 | 233 | #define DEFAULT_HASH R5_HASH |
234 | 234 | |
235 | | /* this is the on disk super block */ |
| 235 | /* this is the on disk superblock */ |
236 | 236 | |
237 | 237 | struct reiserfs_super_block |
238 | 238 | { |
-
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
|
b
|
file_system obfs {
|
39 | 39 | is_buffer false |
40 | 40 | } |
41 | 41 | |
42 | | # dump super block |
| 42 | # dump superblock |
43 | 43 | ioctl 56743 { |
44 | 44 | buffer_size 0 |
45 | 45 | 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
|
b
|
BlockAllocator::_FreeInBitmapBlock(uint64 base, uint32 count,
|
722 | 722 | status_t |
723 | 723 | BlockAllocator::_UpdateSuperBlock(Transaction& transaction) |
724 | 724 | { |
725 | | // write the super block |
| 725 | // write the superblock |
726 | 726 | Block block; |
727 | 727 | if (!block.GetWritable(fVolume, kCheckSumFSSuperBlockOffset / B_PAGE_SIZE, |
728 | 728 | 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
|
b
|
Volume::Initialize(const char* name)
|
209 | 209 | transaction.KeepNode(fRootDirectory); |
210 | 210 | fRootDirectory->SetHardLinks(1); |
211 | 211 | |
212 | | // write the super block |
| 212 | // write the superblock |
213 | 213 | Block block; |
214 | 214 | if (!block.GetZero(this, kCheckSumFSSuperBlockOffset / B_PAGE_SIZE, |
215 | 215 | transaction)) { |
… |
… |
Volume::SetName(const char* name)
|
432 | 432 | // we lock the volume now, to keep the locking order (transaction -> volume) |
433 | 433 | MutexLocker locker(fLock); |
434 | 434 | |
435 | | // update the super block |
| 435 | // update the superblock |
436 | 436 | Block block; |
437 | 437 | if (!block.GetWritable(this, kCheckSumFSSuperBlockOffset / B_PAGE_SIZE, |
438 | 438 | transaction)) { |