You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I read the lecture read_write_lecture, I am confused about the dbuf_dirty() with dnode struct, There are some QA:
1). when write request A in block 0(blk_id), then another write in block 127, if they both have the same parent indirect block, I am confused that how to deal with the write conflict? Because the zfs_range_lock shows that it can have the range lock of the file. But when write request to set dbuf dirty, it should dirty all of the ancestors, So there may have conflict, I don't know how to work it.
2). Above of this, if there have truncate and write request, the truncate should delete the block, but the write should create new dbuf with aligned write. However, if they also have the same parent block(indirect block, ib), then how to deal with the conflict?
the diagram like this:
ib
/\
/ \
\/ \/
dbuf dbuf
(free) (new)
3). if the indirect block don't have any dbuf, does the indrect block should be freeed(dnode level > 1) ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, when I read the lecture read_write_lecture, I am confused about the
dbuf_dirty()
with dnode struct, There are some QA:1). when write request A in block 0(blk_id), then another write in block 127, if they both have the same parent indirect block, I am confused that how to deal with the write conflict? Because the
zfs_range_lock
shows that it can have the range lock of the file. But when write request to set dbuf dirty, it should dirty all of the ancestors, So there may have conflict, I don't know how to work it.2). Above of this, if there have
truncate
andwrite
request, the truncate should delete the block, but the write should create new dbuf with aligned write. However, if they also have the same parent block(indirect block, ib), then how to deal with the conflict?the diagram like this:
3). if the indirect block don't have any dbuf, does the indrect block should be freeed(dnode level > 1) ?
thanks
Beta Was this translation helpful? Give feedback.
All reactions