Re: [PATCH] Btrfs: unlock extent when the dio completes for reads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +static void btrfs_direct_read_iodone(struct kiocb *iocb, loff_t offset,
> +				     ssize_t bytes, void *private, int ret,
> +				     bool is_async)
> +{
> +	struct inode *inode = iocb->ki_filp->f_mapping->host;
> +	u64 lockend;
> +
> +	if (get_state_private(&BTRFS_I(inode)->io_tree, offset, &lockend)) {
> +		WARN_ON(1);
> +		goto out;
> +	}
> +
> +	unlock_extent(&BTRFS_I(inode)->io_tree, offset, lockend);
> +out:
> +	if (is_async)
> +		aio_complete(iocb, ret, 0);
> +	inode_dio_done(inode);
> +}

Hmm.  I'm worried that this can be called from interrupt context and the
state/extent calls there seem to use bare spin locks.  Did you run this
with lockdep?  Am I confused?

- z
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux