Home | History | Annotate | Download | only in v7fs

Lines Matching refs:fs

64 scratch_read(struct v7fs_self *fs, daddr_t blk)
68 MEM_LOCK(fs);
70 if (fs->scratch_free & (1 << i)) {
71 fs->scratch_free &= ~(1 << i);
78 MEM_UNLOCK(fs);
82 if (!fs->io.read(fs->io.cookie, fs->scratch[i], blk)) {
84 fs->scratch_free |= (1 << i);
85 MEM_UNLOCK(fs);
88 MEM_UNLOCK(fs);
91 if ((n = scratch_remain(fs)) < fs->scratch_remain)
92 fs->scratch_remain = n;
94 return fs->scratch[i];
97 if (!fs->io.read(fs->io.cookie, buf, blk)) {
107 scratch_remain(const struct v7fs_self *fs)
112 MEM_LOCK(fs);
114 if (fs->scratch_free & (1 << i)) {
118 MEM_UNLOCK(fs);
126 scratch_free(struct v7fs_self *fs __unused, void *p)
130 MEM_LOCK(fs);
132 if (fs->scratch[i] == p) {
133 fs->scratch_free |= (1 << i);
136 MEM_UNLOCK(fs);