[LU-9347] Getting BLKSSZGET using ioctl Created: 14/Apr/17 Updated: 14/Sep/17 Resolved: 31/Aug/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.7.0 |
| Fix Version/s: | Lustre 2.10.1, Lustre 2.11.0 |
| Type: | Question/Request | Priority: | Minor |
| Reporter: | Mahmoud Hanafi | Assignee: | Emoly Liu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
According to my web searches, the approved way to find out the ioctl (fd, BLKSSZGET, &(align)) However, on Lustre we get the error: Inappropriate ioctl for device Is this ioctl supported and I'm just doing it wrong? |
| Comments |
| Comment by Peter Jones [ 17/Apr/17 ] |
|
Emoly Could you please assist with this one? Thanks Peter |
| Comment by Andreas Dilger [ 17/Apr/17 ] |
|
Mahmoud, what is the requirement for the alignment? Is this for O_DIRECT on the client, or something else? |
| Comment by Mahmoud Hanafi [ 18/Apr/17 ] |
|
The I/O will be issued from a client. We want to ensure alignment of IO for max throughput. |
| Comment by Andreas Dilger [ 24/Apr/17 ] |
|
The optimal IO size for maximum performance is returned via stat(2) on the filename or fstat(2) on the open file descriptor: blksize_t st_blksize;/* optimal file sys I/O ops blocksize */ For Lustre this is typically 1MB or 2MB. The BLKSSZGET ioctl is for returning the minimum alignment for O_DIRECT. For Lustre this is 4096 bytes (PAGE_SIZE), though on other filesystems it is typically 512 or 4096 bytes (sector size). |
| Comment by Andreas Dilger [ 24/Apr/17 ] |
|
Emoly, I think for Lustre it would be possible to return PAGE_SIZE from ll_file_ioctl() for this call. |
| Comment by Gerrit Updater [ 17/Aug/17 ] |
|
Emoly Liu (emoly.liu@intel.com) uploaded a new patch: https://review.whamcloud.com/28578 |
| Comment by Jay Lan (Inactive) [ 22/Aug/17 ] |
|
Hi Emoly, should I consider #28578 patchset #4 good and cherry-pick that one? |
| Comment by Peter Jones [ 22/Aug/17 ] |
|
Jay I would advise holding off until the fix has landed to master if possible - it is still subject to further change until then Peter |
| Comment by Gerrit Updater [ 31/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28578/ |
| Comment by Peter Jones [ 31/Aug/17 ] |
|
Landed for 2.11 |
| Comment by Gerrit Updater [ 05/Sep/17 ] |
|
Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/28861 |
| Comment by Gerrit Updater [ 14/Sep/17 ] |
|
John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/28861/ |