fix(initiator): volume expansion avoid target disconnect & sync dm size#252
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #252 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 38 38
Lines 4874 4898 +24
=====================================
- Misses 4874 4898 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| DefaultUblkQueueDepth = 128 | ||
| DefaultUblkNumberOfQueue = 1 | ||
|
|
||
| DmSectorSize = 512 |
There was a problem hiding this comment.
Investigate it
There was a problem hiding this comment.
After investigating, it seems in linux kernel and dmsetup, it should always be 512, no matter the sector size of physical device.
/**
* The type used for indexing onto a disc or disc partition.
*
* Linux always considers sectors to be 512 bytes long independently
* of the devices real block size.
*
* blkcnt_t is the type of the inode's block count.
*/
typedef u64 sector_t;ref: https://github.com/torvalds/linux/blob/master/include/linux/types.h#L130-L138
/* FIXME Should be elsewhere */
#define SECTOR_SHIFT 9Lref: https://android.googlesource.com/platform/external/lvm2/+/refs/heads/main/tools/dmsetup.c#103
Do I still implement a helper function for this?
There was a problem hiding this comment.
If I'm wrong, please correct me, thank you
Signed-off-by: David Cheng <davidcheng0922@gmail.com>
05dbd78 to
42d3288
Compare
Which issue(s) this PR fixes:
longhorn/longhorn#12359
What this PR does / why we need it:
Option for not stopping target in
StartNvmeTCPInitiator:During volume expansion, we avoid disconnect the target. Any disconnect / connect process may create orphan device.
Add function
SyncDmDeviceSize:Kernel takes time for getting the latest size, the dm table may stay previous size if we don't wait for it
Special notes for your reviewer:
Additional documentation or context