Re: [PATCH 4/8] loop: cover simple read/write via lo_rw_aio()

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

 



> -	cmd->iocb.ki_complete = lo_rw_aio_complete;
> -	cmd->iocb.ki_flags = IOCB_DIRECT;
> +
>  	cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
> +	if (!cmd->use_dio) {
> +		atomic_set(&cmd->ref, 1);
> +		cmd->iocb.ki_flags = 0;
> +		cmd->ret = lo_call_backing_rw_iter(file, &cmd->iocb, &iter, rw);
> +		lo_rw_aio_do_completion(cmd);
> +		return 0;
> +	}

I don't think we even need the special casing.  If you just use the
AIO path here for buffered I/O it will do the same for you at the
small price of an extra refcount operation.

FYI, this seems to be against a kernel that still has cryptoloop/transfers.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux