Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sdb/commands/zfs/dbuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def ObjsetName(os: drgn.Object):
def pretty_print(self, dbufs):
print("{:>20} {:>8} {:>4} {:>8} {:>5} {}".format(
"addr", "object", "lvl", "blkid", "holds", "os"))
for dbuf in dbufs:
for dbuf in filter(self.argfilter, dbufs):
print("{:>20} {:>8d} {:>4d} {:>8d} {:>5d} {}".format(
hex(dbuf), int(dbuf.db.db_object), int(dbuf.db_level),
int(dbuf.db_blkid), int(dbuf.db_holds.rc_count),
Expand Down Expand Up @@ -115,6 +115,10 @@ def all_dnode_dbufs(self, dn: drgn.Object) -> Iterable[drgn.Object]:
def from_dnode(self, dn: drgn.Object) -> Iterable[drgn.Object]:
yield from filter(self.argfilter, self.all_dnode_dbufs(dn))

@sdb.InputHandler(input_type)
def from_dbuf(self, dbuf: drgn.Object) -> Iterable[drgn.Object]:
yield from filter(self.argfilter, [dbuf])

@staticmethod
def all_dbufs() -> Iterable[drgn.Object]:
hash_map = sdb.get_object("dbuf_hash_table").address_of_()
Expand Down
Loading