Re: XFS realtime O_DIRECT failures

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

 



On Tue, Nov 8, 2011 at 11:20 PM, Amit Sahrawat
<amit.sahrawat83@xxxxxxxxx> wrote:
> In my opinion, this is not the way to allocate memory and use for
> O_DIRECT approach. Instead you can make use of valloc() or
> posix_memalign()/memalign
> Or if you are still using malloc() - then you probably did the right
> thing by allocating for alignment like malloc(size + 4096);
> but, store this is permanent pointer and make use of aligned pointer :
> perm_pointer = malloc(size +4096);
> For aligning you need an expression like this:
> align_pointer = (perm_pointer + 4096) & ~(4095);// If you wish to
> align for 512, do it like (p+512) & ~(511);

Thanks.  I adjusted the test application, but still see the bug with
RT subvolumes and direct writes.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


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

  Powered by Linux