Symbol: hfs
stand/lib/hammer1.c
1029
return (hstat(&hf->hfs, hf->ino, st));
stand/lib/hammer1.c
1038
int rv = hreaddir(&hf->hfs, hf->ino, &off, d);
stand/lib/hammer1.c
104
hread(struct hfs *hfs, hammer_off_t off)
stand/lib/hammer1.c
1065
struct hfs hfs;
stand/lib/hammer1.c
1066
hfs.fd = open(argv[1], O_RDONLY);
stand/lib/hammer1.c
1067
if (hfs.fd == -1)
stand/lib/hammer1.c
1070
if (hinit(&hfs) == -1)
stand/lib/hammer1.c
1074
ino_t ino = hlookup(&hfs, argv[i]);
stand/lib/hammer1.c
1081
if (hstat(&hfs, ino, &st)) {
stand/lib/hammer1.c
1094
while (hreaddir(&hfs, ino, &off, &de) == 0) {
stand/lib/hammer1.c
1103
int64_t rl = hreadf(&hfs, ino, off, len, buf);
stand/lib/hammer1.c
111
boff += hfs->buf_beg;
stand/lib/hammer1.c
115
if (be == NULL || be->use > hfs->cache[i].use)
stand/lib/hammer1.c
116
be = &hfs->cache[i];
stand/lib/hammer1.c
117
if (hfs->cache[i].off == boff) {
stand/lib/hammer1.c
118
be = &hfs->cache[i];
stand/lib/hammer1.c
126
ssize_t res = pread(hfs->fd, be->data, HAMMER_BUFSIZE,
stand/lib/hammer1.c
132
int rv = hfs->f->f_dev->dv_strategy(hfs->f->f_devdata, F_READ,
stand/lib/hammer1.c
140
be->use = ++hfs->lru;
stand/lib/hammer1.c
161
hread(struct hfs *hfs, hammer_off_t off)
stand/lib/hammer1.c
168
boff += hfs->buf_beg;
stand/lib/hammer1.c
416
hfind(struct hfs *hfs, hammer_base_elm_t key, hammer_base_elm_t end)
stand/lib/hammer1.c
430
hammer_off_t nodeoff = hfs->root;
stand/lib/hammer1.c
436
node = hread(hfs, nodeoff);
stand/lib/hammer1.c
505
nodeoff = hfs->root;
stand/lib/hammer1.c
540
hdirlocalization(struct hfs *hfs, ino_t ino)
stand/lib/hammer1.c
544
if (ino != hfs->last_dir_ino) {
stand/lib/hammer1.c
552
e = hfind(hfs, &key, &key);
stand/lib/hammer1.c
554
ed = hread(hfs, e->data_offset);
stand/lib/hammer1.c
556
hfs->last_dir_ino = ino;
stand/lib/hammer1.c
557
hfs->last_dir_cap_flags = ed->inode.cap_flags;
stand/lib/hammer1.c
567
if (hfs->last_dir_cap_flags & HAMMER_INODE_CAP_DIR_LOCAL_INO)
stand/lib/hammer1.c
575
hreaddir(struct hfs *hfs, ino_t ino, int64_t *off, struct dirent *de)
stand/lib/hammer1.c
585
key.localization = hdirlocalization(hfs, ino);
stand/lib/hammer1.c
594
e = hfind(hfs, &key, &end);
stand/lib/hammer1.c
604
hammer_data_ondisk_t ed = hread(hfs, e->data_offset);
stand/lib/hammer1.c
616
hresolve(struct hfs *hfs, ino_t dirino, const char *name)
stand/lib/hammer1.c
627
key.localization = hdirlocalization(hfs, dirino);
stand/lib/hammer1.c
634
while ((e = hfind(hfs, &key, &end)) != NULL) {
stand/lib/hammer1.c
638
hammer_data_ondisk_t ed = hread(hfs, e->data_offset);
stand/lib/hammer1.c
663
hlookup(struct hfs *hfs, const char *path)
stand/lib/hammer1.c
690
ino = hresolve(hfs, ino, name);
stand/lib/hammer1.c
699
hstat(struct hfs *hfs, ino_t ino, struct stat* st)
stand/lib/hammer1.c
712
hammer_btree_leaf_elm_t e = hfind(hfs, &key, &key);
stand/lib/hammer1.c
720
hammer_data_ondisk_t ed = hread(hfs, e->data_offset);
stand/lib/hammer1.c
734
hreadf(struct hfs *hfs, ino_t ino, int64_t off, int64_t len, char *buf)
stand/lib/hammer1.c
748
hammer_btree_leaf_elm_t e = hfind(hfs, &key, &end);
stand/lib/hammer1.c
787
char *data = hread(hfs, roff);
stand/lib/hammer1.c
802
struct hfs hfs;
stand/lib/hammer1.c
809
volhead = hread(&hfs, HAMMER_ZONE_ENCODE(1, 0));
stand/lib/hammer1.c
814
hfs.root = volhead->vol0_btree_root;
stand/lib/hammer1.c
815
hfs.buf_beg = volhead->vol_buf_beg;
stand/lib/hammer1.c
822
ino_t ino = hlookup(&hfs, path);
stand/lib/hammer1.c
835
ssize_t rlen = hreadf(&hfs, ino, fs_off, len, buf);
stand/lib/hammer1.c
851
hinit(struct hfs *hfs)
stand/lib/hammer1.c
857
hfs->cache[i].data = malloc(HAMMER_BUFSIZE);
stand/lib/hammer1.c
858
hfs->cache[i].off = -1; // invalid
stand/lib/hammer1.c
859
hfs->cache[i].use = 0;
stand/lib/hammer1.c
862
if (hfs->cache[i].data == NULL)
stand/lib/hammer1.c
866
hfs->lru = 0;
stand/lib/hammer1.c
867
hfs->last_dir_ino = -1;
stand/lib/hammer1.c
869
hammer_volume_ondisk_t volhead = hread(hfs, HAMMER_ZONE_ENCODE(1, 0));
stand/lib/hammer1.c
883
free(hfs->cache[i].data);
stand/lib/hammer1.c
884
hfs->cache[i].data = NULL;
stand/lib/hammer1.c
890
hfs->root = volhead->vol0_btree_root;
stand/lib/hammer1.c
891
hfs->buf_beg = volhead->vol_buf_beg;
stand/lib/hammer1.c
897
hclose(struct hfs *hfs)
stand/lib/hammer1.c
903
if (hfs->cache[i].data) {
stand/lib/hammer1.c
904
free(hfs->cache[i].data);
stand/lib/hammer1.c
905
hfs->cache[i].data = NULL;
stand/lib/hammer1.c
913
struct hfs hfs;
stand/lib/hammer1.c
925
hf->hfs.f = f;
stand/lib/hammer1.c
928
int rv = hinit(&hf->hfs);
stand/lib/hammer1.c
939
hf->ino = hlookup(&hf->hfs, path);
stand/lib/hammer1.c
944
if (hstat(&hf->hfs, hf->ino, &st) == -1)
stand/lib/hammer1.c
959
hclose(&hf->hfs);
stand/lib/hammer1.c
971
hclose(&hf->hfs);
stand/lib/hammer1.c
993
ssize_t rlen = hreadf(&hf->hfs, hf->ino, f->f_offset, maxlen, buf);
stand/lib/hammer2.c
213
h2read(struct hammer2_fs *hfs, void *buf, size_t nbytes, off_t off)
stand/lib/hammer2.c
221
rc = pread(hfs->fd, &media, nbytes, off);
stand/lib/hammer2.c
227
rc = hfs->f->f_dev->dv_strategy(hfs->f->f_devdata, F_READ,
stand/lib/hammer2.c
274
h2lookup(struct hammer2_fs *hfs, hammer2_blockref_t *base,
stand/lib/hammer2.c
330
if (blocksize(base) && h2read(hfs, &media,
stand/lib/hammer2.c
357
bref = &hfs->sroot_blockset.blockref[i];
stand/lib/hammer2.c
397
rc = h2lookup(hfs, &best, key_beg, key_end, bref_ret, pptr);
stand/lib/hammer2.c
417
if (h2read(hfs, &media,
stand/lib/hammer2.c
434
h2resolve(struct hammer2_fs *hfs, const char *path,
stand/lib/hammer2.c
448
*bref = hfs->sroot;
stand/lib/hammer2.c
470
bytes = h2lookup(hfs, bref,
stand/lib/hammer2.c
497
*bref = hfs->sroot;
stand/lib/hammer2.c
498
bytes = h2lookup(hfs, bref,
stand/lib/hammer2.c
549
h2readfile(struct hammer2_fs *hfs, hammer2_blockref_t *bref,
stand/lib/hammer2.c
574
bytes = h2lookup(hfs, bref, off, off + len - 1,
stand/lib/hammer2.c
633
h2init(struct hammer2_fs *hfs)
stand/lib/hammer2.c
662
if (h2read(hfs, &media, sizeof(media.voldata), off))
stand/lib/hammer2.c
680
if (h2read(hfs, &media, sizeof(media.voldata), off))
stand/lib/hammer2.c
682
hfs->sroot.type = HAMMER2_BREF_TYPE_VOLUME;
stand/lib/hammer2.c
683
hfs->sroot.data_off = off;
stand/lib/hammer2.c
684
hfs->sroot_blockset = media.voldata.sroot_blockset;
stand/lib/hammer2.c
685
h2lookup(hfs, NULL, 0, 0, NULL, NULL);
stand/lib/hammer2.c
690
r = h2lookup(hfs, &hfs->sroot,
stand/lib/hammer2.c
692
&hfs->sroot, &data);
stand/lib/hammer2.c
695
h2lookup(hfs, NULL, 0, 0, NULL, NULL);
stand/lib/hammer2.c
696
r = h2lookup(hfs, &hfs->sroot,
stand/lib/hammer2.c
699
&hfs->sroot, &data);
stand/lib/hammer2.c
704
h2lookup(hfs, NULL, 0, 0, NULL, NULL);
stand/lib/hammer2.c
716
static struct hammer2_fs hfs;
stand/lib/hammer2.c
721
if (h2init(&hfs))
stand/lib/hammer2.c
731
h2resolve(&hfs, path, &bref, NULL);
stand/lib/hammer2.c
745
total = h2readfile(&hfs, &bref, fs_off, 0x7FFFFFFF, buf, len);
stand/lib/hammer2.c
767
struct hammer2_fs hfs;
stand/lib/hammer2.c
831
hf->hfs.f = f;
stand/lib/hammer2.c
833
if (h2init(&hf->hfs)) {
stand/lib/hammer2.c
839
h2resolve(&hf->hfs, path, &hf->bref, &ipdata);
stand/lib/hammer2.c
879
total = h2readfile(&hf->hfs, &hf->bref,
stand/lib/hammer2.c
936
bytes = h2lookup(&hf->hfs, &hf->bref,