Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

XATTR directory fixes from ZoL #81

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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
Next Next commit
6841 Undirty freed spill blocks
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
  • Loading branch information
dweeezil authored and Dan McDonald committed Apr 1, 2016
commit ee09d80ceafa7ff7930d1e45dddc21ca3d7a87cb
6 changes: 4 additions & 2 deletions usr/src/uts/common/fs/zfs/dbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,10 @@ dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
dmu_buf_impl_t *db, *db_next;
uint64_t txg = tx->tx_txg;
avl_index_t where;
boolean_t freespill =
(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID);

if (end_blkid > dn->dn_maxblkid && (end_blkid != DMU_SPILL_BLKID))
if (end_blkid > dn->dn_maxblkid && !freespill)
end_blkid = dn->dn_maxblkid;
dprintf_dnode(dn, "start=%llu end=%llu\n", start_blkid, end_blkid);

Expand All @@ -918,7 +920,7 @@ dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
db_search.db_state = DB_SEARCH;

mutex_enter(&dn->dn_dbufs_mtx);
if (start_blkid >= dn->dn_unlisted_l0_blkid) {
if (start_blkid >= dn->dn_unlisted_l0_blkid && !freespill) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine. FYI, we are going to remove dn_unlisted_l0_blkid, having measured that its performance improvement is no longer required now that dn_dbufs is an avl tree.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, future merge heck (one line doesn't seem hellish enough) for someone.

/* There can't be any dbufs in this range; no need to search. */
#ifdef DEBUG
db = avl_find(&dn->dn_dbufs, &db_search, &where);
Expand Down