Re: [RFC 03/12] ltp/fsx.c: Add atomic writes support to fsx

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



On Wed, Jun 11, 2025 at 07:35:54AM -0700, Darrick J. Wong wrote:
> On Wed, Jun 11, 2025 at 03:04:46PM +0530, Ojaswin Mujoo wrote:
> > Implement atomic write support to help fuzz atomic writes
> > with fsx.
> > 
> > Suggested-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx>
> > Signed-off-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx>
> > ---

<snip>

> > +
> >  #ifdef HAVE_COPY_FILE_RANGE
> >  int
> >  test_copy_range(void)
> > @@ -2385,6 +2466,14 @@ have_op:
> >  			dowrite(offset, size, 0);
> >  		break;
> >  
> > +	case OP_WRITE_ATOMIC:
> > +		TRIM_OFF_LEN(offset, size, maxfilelen);
> > +		if (do_atomic_writes)
> > +			dowrite(offset, size, RWF_ATOMIC);
> > +		else
> > +			dowrite(offset, size, 0);
> 
> Er.... shouldn't we skip OP_ATOMIC_WRITE if !do_atomic_writes?
> There's a whole switch statement further up in test() that does things
> like:
> 
> 	case OP_COPY_RANGE:
> 		if (!copy_range_calls) {
> 			log5(op, offset, size, offset2, FL_SKIPPED);
> 			goto out;
> 		}
> 		break;
> 
> to break out early.
> 
> --D

Got it, I'll make the change Darrick.

Thanks,
ojaswin





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

  Powered by Linux