Motr
M0
|
Functions | |
def | RecordOffset (record, i, size) |
def | ReadTypeSize (byte) |
def | EditMetadata (offset) |
def | ReadMetadata (offset) |
def | ReadCompleteRecord (offset) |
def | ReadBeBNode (offset) |
def | InduceCorruption (recordType, noOfErr) |
def | InduceRandomCorruption (noOfErr) |
def | InduceErrInRecords (recList) |
def | InduceHugeError () |
def | Induce512kbError () |
def | ConvertAdstob2Cob (stob_f_container, stob_f_key) |
def | ConvertCobAdstob (cob_f_container, cob_f_key) |
def | CorruptEmap (recordType, stob_f_container, stob_f_key) |
def | ListAllEmapPerDevice () |
def | VerifyLengthOfRecord (recordDict) |
def | read_metadata_file () |
Variables | |
timestr = time.strftime("%Y%m%d-%H%M%S") | |
string | log_filename = "hole_creation_" + timestr + ".log" |
logger = logging.getLogger() | |
fh = logging.FileHandler(log_filename) | |
ch = logging.StreamHandler() | |
fformatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') | |
cformatter = logging.Formatter('%(levelname)s : %(message)s') | |
parser = argparse.ArgumentParser(description="Basic Arguments to run the script") | |
action | |
default | |
False | |
dest | |
help | |
type | |
int | |
float | |
args = parser.parse_args() | |
results = parser.parse_args() | |
filename = args.mfile | |
recordType = args.Record_Type | |
noOfErr = args.noOfErr | |
seed = args.seed | |
random_system = random.SystemRandom() | |
string | header = b'33011ca5e511de77' |
string | footer = b'33f007e7f007e777' |
dictionary | typeDict |
dictionary | recordDict |
list | AllRecordList |
list | DMDList = ['BE_BNODE', 'BE_EMAP_KEY', 'BE_EMAP_REC', 'COB_NSREC', 'BALLOC_GROUP_DESC'] |
list | GMDList |
dictionary | btreeType |
dictionary | BeBnodeTypeKeys = {} |
int | noOfErrs = 0 |
cob_f_container = hex(int(_f_container, 16)) | |
cob_f_key = hex(int(_f_key, 16)) | |
stob_f_container | |
stob_f_key | |
def error_injection.ConvertAdstob2Cob | ( | stob_f_container, | |
stob_f_key | |||
) |
Method to extract cob related data.
Definition at line 354 of file error_injection.py.
def error_injection.ConvertCobAdstob | ( | cob_f_container, | |
cob_f_key | |||
) |
Method take cob_f_cotainer, cob_f_key and returns stob_f_container, stob_f_key.
Definition at line 369 of file error_injection.py.
def error_injection.CorruptEmap | ( | recordType, | |
stob_f_container, | |||
stob_f_key | |||
) |
Method corrupts EMAP record specified by Cob ID.
Definition at line 381 of file error_injection.py.
def error_injection.EditMetadata | ( | offset | ) |
Edit metadata with the fixed pattern of 0x1111222244443333.
Definition at line 173 of file error_injection.py.
def error_injection.Induce512kbError | ( | ) |
Corrupt 512k Metadata in Metadata file from random location.
Definition at line 329 of file error_injection.py.
def error_injection.InduceCorruption | ( | recordType, | |
noOfErr | |||
) |
Induces Corruption in a record with number of error.
Definition at line 224 of file error_injection.py.
def error_injection.InduceErrInRecords | ( | recList | ) |
Function which induces error in a particular type of record.
Definition at line 282 of file error_injection.py.
def error_injection.InduceHugeError | ( | ) |
Corrupt Metadata file from random location till end of metadata file.
Definition at line 308 of file error_injection.py.
def error_injection.InduceRandomCorruption | ( | noOfErr | ) |
Induces corruption in meta data at random offset.
Definition at line 254 of file error_injection.py.
def error_injection.ListAllEmapPerDevice | ( | ) |
def error_injection.read_metadata_file | ( | ) |
Definition at line 458 of file error_injection.py.
def error_injection.ReadBeBNode | ( | offset | ) |
Reads BeNode data.
Definition at line 209 of file error_injection.py.
def error_injection.ReadCompleteRecord | ( | offset | ) |
Function read complete record starting after header and until footer for record.
Definition at line 194 of file error_injection.py.
def error_injection.ReadMetadata | ( | offset | ) |
Verifies that meta-data contains the valid footer at the given offset.
Definition at line 184 of file error_injection.py.
def error_injection.ReadTypeSize | ( | byte | ) |
def error_injection.RecordOffset | ( | record, | |
i, | |||
size | |||
) |
def error_injection.VerifyLengthOfRecord | ( | recordDict | ) |
Definition at line 49 of file error_injection.py.
list AllRecordList |
Definition at line 138 of file error_injection.py.
args = parser.parse_args() |
Definition at line 81 of file error_injection.py.
dictionary BeBnodeTypeKeys = {} |
Definition at line 153 of file error_injection.py.
dictionary btreeType |
Definition at line 146 of file error_injection.py.
Definition at line 40 of file error_injection.py.
ch = logging.StreamHandler() |
Definition at line 37 of file error_injection.py.
Definition at line 520 of file error_injection.py.
Definition at line 521 of file error_injection.py.
default |
Definition at line 49 of file error_injection.py.
dest |
Definition at line 49 of file error_injection.py.
list DMDList = ['BE_BNODE', 'BE_EMAP_KEY', 'BE_EMAP_REC', 'COB_NSREC', 'BALLOC_GROUP_DESC'] |
Definition at line 142 of file error_injection.py.
False |
Definition at line 49 of file error_injection.py.
Definition at line 39 of file error_injection.py.
fh = logging.FileHandler(log_filename) |
Definition at line 34 of file error_injection.py.
filename = args.mfile |
Definition at line 100 of file error_injection.py.
float |
Definition at line 69 of file error_injection.py.
string footer = b'33f007e7f007e777' |
Definition at line 121 of file error_injection.py.
list GMDList |
Definition at line 143 of file error_injection.py.
string header = b'33011ca5e511de77' |
Definition at line 119 of file error_injection.py.
help |
Definition at line 50 of file error_injection.py.
int |
Definition at line 51 of file error_injection.py.
string log_filename = "hole_creation_" + timestr + ".log" |
Definition at line 29 of file error_injection.py.
logger = logging.getLogger() |
Definition at line 31 of file error_injection.py.
noOfErr = args.noOfErr |
Definition at line 102 of file error_injection.py.
def noOfErrs = 0 |
Definition at line 492 of file error_injection.py.
parser = argparse.ArgumentParser(description="Basic Arguments to run the script") |
Definition at line 48 of file error_injection.py.
random_system = random.SystemRandom() |
Definition at line 112 of file error_injection.py.
dictionary recordDict |
Definition at line 132 of file error_injection.py.
recordType = args.Record_Type |
Definition at line 101 of file error_injection.py.
results = parser.parse_args() |
Definition at line 83 of file error_injection.py.
seed = args.seed |
Definition at line 105 of file error_injection.py.
stob_f_container |
Definition at line 522 of file error_injection.py.
stob_f_key |
Definition at line 522 of file error_injection.py.
type |
Definition at line 51 of file error_injection.py.
dictionary typeDict |
Definition at line 123 of file error_injection.py.