Lines Matching refs:fbl
13 #include <fbl/auto_lock.h>
23 #include <fbl/algorithm.h>
24 #include <fbl/function.h>
25 #include <fbl/intrusive_hash_table.h>
26 #include <fbl/intrusive_single_list.h>
27 #include <fbl/macros.h>
28 #include <fbl/ref_ptr.h>
29 #include <fbl/unique_ptr.h>
127 public fbl::RefCounted<Minfs> {
133 static zx_status_t Create(fbl::unique_ptr<Bcache> bc, const minfs_info_t* info,
134 fbl::unique_ptr<Minfs>* out);
138 zx_status_t VnodeGet(fbl::RefPtr<VnodeMinfs>* out, ino_t ino);
141 zx_status_t VnodeNew(Transaction* state, fbl::RefPtr<VnodeMinfs>* out, uint32_t type);
145 fbl::RefPtr<VnodeMinfs> VnodeLookup(uint32_t ino) FS_TA_EXCLUDES(hash_lock_);
177 fbl::unique_ptr<Transaction>* out);
179 void CommitTransaction(fbl::unique_ptr<Transaction> state) {
189 void SetUnmountCallback(fbl::Closure closure) { on_unmount_ = fbl::move(closure); }
249 fbl::unique_ptr<Bcache> bc_;
254 using HashTable = fbl::HashTable<ino_t, VnodeMinfs*>;
257 Minfs(fbl::unique_ptr<Bcache> bc, fbl::unique_ptr<Superblock> sb,
258 fbl::unique_ptr<Allocator> block_allocator,
259 fbl::unique_ptr<InodeManager> inodes,
260 fbl::unique_ptr<WritebackBuffer> writeback,
263 Minfs(fbl::unique_ptr<Bcache> bc, fbl::unique_ptr<Superblock> sb,
264 fbl::unique_ptr<Allocator> block_allocator,
265 fbl::unique_ptr<InodeManager> inodes, BlockOffsets offsets);
283 fbl::unique_ptr<Superblock> sb_;
284 fbl::unique_ptr<Allocator> block_allocator_;
285 fbl::unique_ptr<InodeManager> inodes_;
290 fbl::Mutex hash_lock_;
296 fbl::Closure on_unmount_{};
298 fbl::unique_ptr<WritebackBuffer> writeback_;
313 fbl::StringPiece name;
322 public fbl::SinglyLinkedListable<VnodeMinfs*>,
323 public fbl::Recyclable<VnodeMinfs> {
334 static void Allocate(Minfs* fs, uint32_t type, fbl::RefPtr<VnodeMinfs>* out);
339 static zx_status_t Recreate(Minfs* fs, ino_t ino, fbl::RefPtr<VnodeMinfs>* out);
356 zx_status_t Open(uint32_t flags, fbl::RefPtr<Vnode>* out_redirect) final;
359 // fbl::Recyclable interface.
380 zx_status_t Lookup(fbl::RefPtr<fs::Vnode>* out, fbl::StringPiece name) final;
390 zx_status_t Create(fbl::RefPtr<fs::Vnode>* out, fbl::StringPiece name,
392 zx_status_t Unlink(fbl::StringPiece name, bool must_be_dir) final;
393 zx_status_t Rename(fbl::RefPtr<fs::Vnode> newdir,
394 fbl::StringPiece oldname, fbl::StringPiece newname,
396 zx_status_t Link(fbl::StringPiece name, fbl::RefPtr<fs::Vnode> target) final;
412 zx_status_t LookupInternal(fbl::RefPtr<fs::Vnode>* out, fbl::StringPiece name);
416 zx_status_t CheckNotSubdirectory(fbl::RefPtr<VnodeMinfs> newdir);
418 using DirentCallback = zx_status_t (*)(fbl::RefPtr<VnodeMinfs>,
429 static zx_status_t DirentCallbackFind(fbl::RefPtr<VnodeMinfs>, minfs_dirent_t*, DirArgs*);
430 static zx_status_t DirentCallbackUnlink(fbl::RefPtr<VnodeMinfs>, minfs_dirent_t*, DirArgs*);
431 static zx_status_t DirentCallbackForceUnlink(fbl::RefPtr<VnodeMinfs>, minfs_dirent_t*,
433 static zx_status_t DirentCallbackAttemptRename(fbl::RefPtr<VnodeMinfs>, minfs_dirent_t*,
435 static zx_status_t DirentCallbackUpdateInode(fbl::RefPtr<VnodeMinfs>, minfs_dirent_t*,
437 static zx_status_t DirentCallbackFindSpace(fbl::RefPtr<VnodeMinfs>, minfs_dirent_t*, DirArgs*);
444 zx_status_t UnlinkChild(Transaction* state, fbl::RefPtr<VnodeMinfs> child,
466 const size_t vmo_size = fbl::round_up(inode_.size, kMinfsBlockSize);
641 void Notify(fbl::StringPiece name, unsigned event) final;
670 fbl::unique_ptr<fzl::MappedVmo> vmo_indirect_{};
717 void minfs_sync_vnode(fbl::RefPtr<VnodeMinfs> vn, uint32_t flags);
724 zx_status_t minfs_mount(fbl::unique_ptr<minfs::Bcache> bc, fbl::RefPtr<VnodeMinfs>* root_out);