CN107391394A - A kind of method and device for handling more NameSpace LBA - Google Patents
A kind of method and device for handling more NameSpace LBA Download PDFInfo
- Publication number
- CN107391394A CN107391394A CN201710656115.XA CN201710656115A CN107391394A CN 107391394 A CN107391394 A CN 107391394A CN 201710656115 A CN201710656115 A CN 201710656115A CN 107391394 A CN107391394 A CN 107391394A
- Authority
- CN
- China
- Prior art keywords
- lba
- firmware
- main frame
- sections
- namespace
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of method and device for handling more NameSpace LBA, wherein this method includes:A NameSpace in multiple NameSpaces is specified in the instruction that Receiving Host is sent, the instruction, and each NameSpace includes multiple firmware LBA sections, and each firmware LBA sections have corresponding segment number and including multiple firmware LBA;Calculate the segment number of the corresponding firmware LBA sections in the NameSpace specified of main frame LBA corresponding to the instruction, the position of firmware LBA corresponding to the main frame LBA is determined in firmware LBA sections corresponding to the segment number, so that firmware LBA of the main frame based on the position correspondence performs the instruction.This method can make main frame LBA to firmware LBA conversion simple and easy, facilitate main frame to navigate to firmware LBA and then execute instruction.Device provided by the invention is corresponding with this method, can also make main frame LBA to firmware LBA conversion simple and easy.
Description
Technical field
The present invention relates to technical field of data processing, more specifically to a kind of method for handling more NameSpace LBA
And device.
Background technology
For an enterprise, substantial amounts of different types of data are might have, thus its storage device (such as solid-state
Hard disk) capacity can be very big, in order to improve the security and independence between variety classes data, it usually needs different types of
Data are placed in relatively independent logical space.When the logical space division to storage device, NameSpace is introduced
(namespace) this concept, each NameSpace is by some sections of independent LBA (Logical Block Address, logic
Block address) composition.
When main frame issues I/O (I/O, Input/Output, input/output) instructions, it is necessary to corresponding to host command
The firmware LBA that main frame LBA is changed into order space, to realize I/O operation of the main frame to solid state hard disc.Existing solid-state is hard
Disk can support more NameSpaces, and the possibility for creating, deleting or merging NameSpace repeatedly due to user be present, firmware LBA can
Fragmentation can be occurred, i.e., the LBA in whole NameSpace may be discontinuous, therefore will main frame LBA conversions corresponding to instruction
It is just very difficult into the firmware LBA in NameSpace.
In summary, how a kind of simple and easy firmware LBA being converted into main frame LBA in NameSpace side is provided
Method, it is current those skilled in the art's urgent problem to be solved.
The content of the invention
It is an object of the invention to provide a kind of method and device for handling more NameSpace LBA so that changes main frame LBA
Process for firmware LBA is simple, is easy to main frame to navigate to execute instruction after firmware LBA.
To achieve these goals, the present invention provides following technical scheme:
A kind of method for handling more NameSpace LBA, including:
The instruction that Receiving Host is sent, a NameSpace in multiple NameSpaces is specified in the instruction, each described
NameSpace includes multiple firmware LBA sections, and each firmware LBA sections have corresponding segment number, and each firmware LBA
Section includes multiple firmware LBA;
Calculate the corresponding firmware LBA sections in the NameSpace specified of main frame LBA corresponding to the instruction
Segment number, the position of firmware LBA corresponding to the main frame LBA is determined in firmware LBA sections corresponding to the segment number, for main frame base
The instruction is performed in the firmware LBA of the position correspondence.
Preferably, the corresponding firmwares in the NameSpace specified of main frame LBA corresponding to the instruction are calculated
The position of the segment number of LBA sections and corresponding firmware LBA, including:
, will if the firmware LBA quantity that each firmware LBA sections include in the NameSpace specified is equal
As dividend, the firmware LBA each included in the firmware LBA sections number obtains correspondingly the main frame LBA as divisor
Integer quotient and the remainder, determine the integer quotient for the main frame LBA it is described instruction specify NameSpace in corresponding firmware
The segment number of LBA sections, it is the main frame LBA corresponding firmware LBA in NameSpace is specified in the instruction to determine the remainder
Position.
Preferably, it is the main frame LBA corresponding firmware LBA in NameSpace is specified in the instruction to determine the remainder
Position after, in addition to:
If the firmware LBA in the NameSpace specified is continuous, section corresponding to the main frame LBA is determined
The first address of firmware LBA sections corresponding to number, it is determined that representing the remainder of firmware LBA positions and institute corresponding to the main frame LBA
State first address and be firmware LBA corresponding with the main frame LBA, and firmware LBA is returned into the main frame.
Preferably, the first address for determining firmware LBA sections corresponding to segment number corresponding to the main frame LBA, including:
The first address of firmware LBA sections corresponding to segment number corresponding with the main frame LBA is determined according to the following formula:
The first address at firmware LBA ends corresponding to the main frame LBA=segment number corresponding to main frame LBA × described refers to
The number for the firmware LBA that each firmware LBA sections include in fixed NameSpace.
Preferably, after the instruction that Receiving Host is sent, calculate main frame LBA corresponding to the instruction and refer to described
In fixed NameSpace before the segment number of corresponding firmware LBA sections, in addition to:
Judge whether the main frame LBA is more than the total number of firmware LBA in the NameSpace specified, if sentenced
Disconnected result is no, then it is corresponding in the NameSpace specified to perform main frame LBA corresponding to the calculating instruction
Firmware LBA sections segment number the step of;If it is judged that being yes, then the prompting message of main frame LBA mistakes is returned to main frame.
A kind of device for handling more NameSpace LBA, including:
Receiving unit, it is used for:A name in multiple NameSpaces is specified in the instruction that Receiving Host is sent, the instruction
Space, each NameSpace include multiple firmware LBA sections, and each firmware LBA sections have corresponding segment number, and often
The individual firmware LBA sections include multiple firmware LBA;
Computing unit, it is used for:It is corresponding in the NameSpace specified to calculate main frame LBA corresponding to the instruction
Firmware LBA sections segment number, the position of firmware LBA corresponding to the main frame LBA is determined in firmware LBA sections corresponding to the segment number
Put, so that firmware LBA of the main frame based on the position correspondence performs the instruction.
Preferably, the computing unit includes:
Computation subunit, it is used for:If what each firmware LBA sections included in the NameSpace specified consolidates
Part LBA quantity is equal, using the main frame LBA as dividend, the firmware LBA each included in the firmware LBA sections number
As divisor, corresponding integer quotient and the remainder are obtained, determine that the integer quotient specifies name for the main frame LBA in the instruction
The segment number of corresponding firmware LBA sections in space, determine the remainder for the main frame LBA it is described instruction specify NameSpace in
Corresponding firmware LBA position.
Preferably, in addition to:
Acquiring unit, it is used for:Determine that the remainder is specified for the main frame LBA in the instruction in the computation subunit
In NameSpace behind corresponding firmware LBA position, the head of firmware LBA sections corresponding to segment number corresponding to the main frame LBA is determined
Address, it is determined that representing the remainder of firmware LBA positions corresponding to the main frame LBA and the first address and be and the master
Firmware LBA corresponding to machine LBA, and firmware LBA is returned into the main frame.
Preferably, in addition to:
Subelement is obtained, is used for:When firmware LBA is to connect in each firmware LBA sections in the NameSpace specified
It is continuous, then the first address of firmware LBA sections corresponding to segment number corresponding with the main frame LBA is determined according to the following formula:
It is each described solid in the first address=segment number corresponding to main frame LBA × NameSpace specified
The number for the firmware LBA that part LBA sections include.
Preferably, in addition to:
Judging unit, it is used for:After the instruction that receiving unit receives that the main frame is sent, calculate corresponding to the instruction
Whether main frame LBA judges the main frame LBA in the NameSpace specified before the segment number of corresponding firmware LBA sections
More than the total number of firmware LBA in the NameSpace specified, if it is judged that being no, it indicates that computing unit is held
The row section for calculating main frame LBA corresponding firmware LBA sections in the NameSpace specified corresponding to the instruction
Number function;If it is judged that it is yes, it indicates that the Tip element work;
First Tip element, is used for:The prompting message of main frame LBA mistakes is returned to main frame.
Preferably, in addition to:
Second Tip element, is used for:Determine that the main frame LBA is more than firmware in the NameSpace specified
After LBA total number, the prompting message of main frame LBA mistakes is returned to mobile terminal set in advance.
The invention provides a kind of method and device for handling more NameSpace LBA, this method includes:Receiving Host is sent
Instruction, the instruction specifies a NameSpace in multiple NameSpaces, and each NameSpace includes multiple solid
Part LBA sections, each firmware LBA sections have corresponding segment number, and each firmware LBA sections include multiple firmware LBA;Meter
The segment number of the corresponding firmware LBA sections in the NameSpace specified of main frame LBA corresponding to the instruction is calculated, in the section
The position of firmware LBA corresponding to the main frame LBA is determined in firmware LBA sections corresponding to number, so that main frame is determined based on the position
Position is to performing the instruction after firmware LBA corresponding with main frame LBA.In more NameSpaces, each NameSpace is by multiple solid
Part LBA sections form, and each LBA sections have corresponding segment number, and present invention calculating main frame LBA first specifies in host command
NameSpace in corresponding LBA segment numbers, can be navigated to by LBA segment numbers from multiple firmware LBA sections of the NameSpace
One firmware LBA section, reduces orientation range;Then, the main frame LBA is determined in firmware LBA sections corresponding to the segment number
Corresponding firmware LBA position is just easy to, and final host computer, which is navigated to after firmware LBA, performs order, therefore the invention enables
Main frame LBA to firmware LBA conversion are simple and easy.The device of the more NameSpaces of processing provided by the invention is relative with the above method
Should, therefore can also make main frame LBA to firmware LBA conversion simple and easy.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of flow chart of method for handling more NameSpace LBA provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of device for handling more NameSpace LBA provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
Referring to Fig. 1, it illustrates a kind of flow chart for the method for handling more NameSpaces provided in an embodiment of the present invention,
It can include:
S11:The instruction that Receiving Host is sent, instruct the NameSpace specified in multiple NameSpaces, each name
Space includes multiple firmware LBA sections, and each firmware LBA sections have corresponding segment number, and each firmware LBA sections are including multiple solid
Part LBA.
The instruction that main frame is sent can specify a NameSpace in multiple NameSpaces.In this application, main frame is sent out
The instruction sent is generally I/O instructions, naturally it is also possible to is other satisfactory instructions.Multiple lives can be included in the instruction
The mark of some NameSpace in the name space, by the mark come NameSpace corresponding to designated identification, naturally it is also possible to pass through
Other modes specify a NameSpace, as long as command reception end can be made clearly to know smoothly enter in which NameSpace
Step in row S12.The quantity of firmware LBA sections in the NameSpace specified is pre-set, and each
Firmware LBA sections have multiple firmware LBA, can set firmware LBA sections according to address size required in actual conditions
The number of quantity and the firmware LBA in each firmware LBA sections.
S12:The segment number of the corresponding firmware LBA sections in the NameSpace specified of main frame LBA corresponding to computations,
The position of firmware LBA corresponding to main frame LBA is determined in firmware LBA sections corresponding to the segment number, so that main frame is based on the position
Corresponding firmware LBA execute instructions.
The step is that main frame LBA corresponding to instruction is converted into corresponding firmware LBA in order space, it is first determined main frame
LBA is in the segment number of the corresponding firmware LBA sections for the NameSpace specified, the corresponding segment number of firmware LBA section, therefore
After segment number is determined, you can navigate to firmware LBA sections corresponding to the segment number, then judge that main frame LBA corresponds to firmware LBA again
Position in firmware LBA sections after positioning, main frame LBA may finally be navigated to according to the position by main frame or command reception end
Corresponding firmware LBA, perform order for main frame and be ready.
In technical scheme disclosed in the present application, a firmware LBA section, Ran Houzai are first determined from multiple firmware LBA sections
The firmware LBA of needs is navigated to from firmware LBA sections, orientation range is reduced step by step, it is corresponding finally to navigate to main frame LBA
Firmware LBA, perform order for main frame and be ready, therefore technical scheme disclosed in the present application causes main frame LBA to firmware LBA
Conversion it is simple and easy.
Specifically, in more NameSpaces, each NameSpace is made up of multiple firmware LBA sections, and each LBA sections
All there is corresponding segment number, present invention calculating main frame LBA first corresponding LBA sections in the NameSpace that host command is specified
Number, a firmware LBA section can be navigated to from multiple firmware LBA sections of the NameSpace by LBA segment numbers, reduce positioning
Scope;Then, determine that the position of firmware LBA corresponding to main frame LBA is just easy in firmware LBA sections corresponding to the segment number,
Final host computer performs order after navigating to firmware LBA, therefore the invention enables main frame LBA to firmware LBA conversion is simply easy
OK.
A kind of method for having handled more NameSpace LBA provided in an embodiment of the present invention, main frame LBA corresponding to computations
The segment number of corresponding firmware LBA sections and corresponding firmware LBA position in the NameSpace specified, can include:
If the firmware LBA quantity that each firmware LBA sections include in the NameSpace specified is equal, by main frame LBA
As dividend, the firmware LBA included in each firmware LBA sections number as divisor, obtain corresponding to integer quotient and the remainder,
Determine that integer quotient specifies the segment number of corresponding firmware LBA sections in NameSpace for main frame LBA in instruction, it is main frame to determine remainder
LBA specifies the position of corresponding firmware LBA in NameSpace in instruction.
When NameSpace is created, for the ease of managing and preventing firmware LBA fragmentations, firmware is generally all
Firmware LBA be divided into several firmwares LBA sections of equal length, i.e., the total firmware LBA of each firmware LBA sections quantity can be with
It is equal, then ready-portioned firmware LBA sections is numbered, the corresponding segment number of a firmware LBA section.Because when each
When the quantity for the firmware LBA that firmware LBA sections include is identical, if the quantity of the firmware LBA in each firmware LBA sections
For n, then the firmware LBA in each firmware LBA sections is from the 0th to (n-1)th, therefore by the way that main frame LBA is used as
Dividend, firmware LBA quantity is as divisor, and obtained integer quotient is a, remainder b, then firmware LBA corresponding to main frame LBA
Segment number be exactly a;In the firmware LBA sections that segment number is a, b-th of firmware LBA is firmware LBA corresponding to main frame LBA.Division is
Dividend is grouped, every group of size is identical with divisor, and integer quotient is packet number, and remainder is the part less than divisor, right
Should be into this method, for main frame LBA as dividend, firmware LBA number is equal in each firmware LBA sections, therefore can conduct
Divisor, by doing simple division, it just can easily draw firmware corresponding to the corresponding segment numbers of main frame LBA and main frame LBA
Positions of the LBA in the segment number.
A kind of method for having handled more NameSpace LBA provided in an embodiment of the present invention, determine that remainder is referring to for main frame LBA
In the specified NameSpace of order behind corresponding firmware LBA position, it can also include:
If the firmware LBA in the NameSpace specified is continuous, determine corresponding to segment number corresponding to main frame LBA
The first address of firmware LBA sections, it is determined that representing the remainder of firmware LBA positions corresponding to main frame LBA and first address and be and main frame
Firmware LBA corresponding to LBA, and firmware LBA is returned into main frame.
Determine the first address of firmware LBA sections corresponding to segment number corresponding to main frame LBA namely first firmware LBA, Ran Houli
With the first address and remainder and the corresponding firmware LBA with regard to main frame LBA can be represented the exact address that has calculated, if
It is determined that obtained first address is A, main frame LBA is in the NameSpace specified as corresponding to computations in previous method
The remainder b being calculated in the segment number of corresponding firmware LBA sections and corresponding firmware LBA position, then main frame LBA cans table
It is shown as:Main frame LBA=A+b, after main frame LBA address is returned into main frame, main frame can be arrived directly by the address acquisition
Firmware LBA, for main frame execute instruction so that acquisition of the main frame to the firmware LBA of needs is simple and convenient.
A kind of method for having handled more NameSpace LBA provided in an embodiment of the present invention, determines firmware LBA corresponding to segment number
The first address of section, can include:
The first address of firmware LBA sections corresponding with segment number is determined according to the following formula:
Each firmware LBA in the NameSpace that first address=segment number × instruction of firmware LBA sections corresponding to main frame LBA is specified
The number for the firmware LBA that section includes.
Obtain the first address of segment number corresponding to corresponding firmware LBA sections of the main frame LBA in the NameSpace specified
Method can be inquired about to register, the first address is known by register, but when in the NameSpace that specify each
The firmware LBA quantity that firmware LBA sections include is equal, and when all firmware LBA is continuous in firmware LBA sections, such as
There is n firmware LBA in each firmware LBA sections, segment number is that the firmware LBA in 0 firmware LBA sections is from 0 to n-1, and segment number is 1
Firmware LBA in firmware LBA sections be from n to 2n-1, segment number be 2 firmware LBA sections in firmware LBA be from 2n to 3n-1, its
Remaining segment number is by that analogy, it is seen that the first address for the firmware LBA sections that segment number is 0 is 0 × n=0, and segment number is the head of 1 firmware LBA sections
Address is 1 × n=n, and the first address for the firmware LBA sections that segment number is 2 is 2 × n=2n, it is seen then that can be by segment number and each solid
Part LBA quantity is multiplied, and can obtain the first address of the segment number, calculates simple and convenient, without by method for distinguishing, such as posts
Storage etc. is inquired about, and has saved the time.
A kind of method for having handled more NameSpace LBA provided in an embodiment of the present invention, in the instruction that Receiving Host is sent
Afterwards, main frame LBA corresponding to computations before the segment number of corresponding firmware LBA sections, is gone back in the NameSpace specified
Including:
Judge whether main frame LBA is more than the total number of firmware LBA in the NameSpace specified, if it is judged that being
It is no, then perform the step of main frame LBA segment numbers of corresponding firmware LBA sections in the NameSpace specified corresponding to computations
Suddenly;If it is judged that being yes, then the prompting message of main frame LBA mistakes is returned to main frame.
If not judging whether main frame LBA is more than the total quantity of firmware LBA in the NameSpace specified, then can
There can be the total quantity that main frame LBA is more than firmware LBA in the NameSpace specified, be not deposit by the segment number being calculated
Situation.If for example, firmware LBA sums are m in the NameSpace specified, segment number has a LBA from 0 to a-1
Section, every section has n firmware LBA, therefore can have following equation to set up:A=m/n, when main frame LBA is more than m, it can obtain
Such as lower inequality:Main frame LBA/n>A, actual segment number does not include the segment number being calculated, so main frame is according to the section calculated
Number can not navigate to firmware LBA sections corresponding to main frame LBA, thus main frame can not normal execute instruction, waste the time, it is also possible to
Cause failure;In addition, when main frame LBA is more than firmware LBA sum in the order space specified, LBA is returned to main frame
The prompting message of mistake, mistake when can allow the main frame to know present instruction in time, and then continue to issue etc. pending
Instruction, has saved the time.
A kind of method for having handled more NameSpace LBA provided in an embodiment of the present invention, determine that main frame LBA is more than instruction
In the NameSpace specified after firmware LBA total number, it can also include:
The prompting message of main frame LBA mistakes is returned to mobile terminal set in advance.
After main frame LBA is more than firmware LBA total number in the NameSpace specified, to movement set in advance eventually
End plays the prompting message of main frame LBA mistakes, even if worker, not beside main frame, can also know in time has order not hold correctly
Capable prompting message, worker can according to the prompting message adjust order in corresponding main frame LBA, order space size or
The middle LBA of firmware LBA sections quantity, the generation of mistake is reduced, improve order execution efficiency.
The embodiment of the present invention additionally provides a kind of device for handling more NameSpace LBA, as shown in Fig. 2 can include:
Receiving unit 11, is used for:The instruction that Receiving Host is sent, instruct and specify a name in multiple NameSpaces empty
Between, each NameSpace includes multiple firmware LBA sections, and each firmware LBA sections have corresponding segment number, and each firmware LBA
Section includes multiple firmware LBA;
Computing unit 12, is used for:The corresponding firmwares in the NameSpace specified of main frame LBA corresponding to computations
The segment number of LBA sections, the position of firmware LBA corresponding to main frame LBA is determined in firmware LBA sections corresponding to the segment number, for master
Firmware LBA execute instruction of the machine based on the position correspondence.
A kind of device for handling more NameSpace LBA provided in an embodiment of the present invention, computing unit can include:
Computation subunit, it is used for:If the firmware LBA numbers that each firmware LBA sections include in the NameSpace specified
Measure equal, using main frame LBA as dividend, the firmware LBA included in each firmware LBA sections number is obtained pair as divisor
The integer quotient and the remainder answered, determine that integer quotient is specified the section of corresponding firmware LBA sections in NameSpace by main frame LBA in instruction
Number, determine that remainder specifies the position of corresponding firmware LBA in NameSpace for main frame LBA in instruction.
A kind of device for handling more NameSpace LBA provided in an embodiment of the present invention, can also include:
Acquiring unit, it is used for:If the firmware LBA in the NameSpace specified is continuous, in computation subunit
Determine that remainder behind corresponding firmware LBA position, is determined corresponding to main frame LBA for main frame LBA in the specified NameSpace of instruction
The first address of firmware LBA sections corresponding to segment number, it is determined that representing the remainder of firmware LBA positions corresponding to main frame LBA and first address
With for firmware LBA corresponding with main frame LBA, and firmware LBA is returned into main frame.
A kind of device for handling more NameSpace LBA provided in an embodiment of the present invention, acquiring unit can include:
Subelement is obtained, is used for:Firmware LBA sections corresponding to segment number corresponding with main frame LBA are determined according to the following formula
First address:
The NameSpace that segment number × instruction corresponding to the first address of firmware LBA sections=main frame LBA corresponding to main frame LBA is specified
In the firmware LBA number that includes of each firmware LBA sections.
A kind of device for handling more NameSpace LBA provided in an embodiment of the present invention, can also include:
Judging unit, it is used for:After the instruction that receiving unit Receiving Host is sent, main frame LBA corresponding to computations
Judge whether main frame LBA is more than what is specified before the segment number of corresponding firmware LBA sections in the NameSpace specified
Firmware LBA total number in NameSpace, if it is judged that being no, it indicates that computing unit performs main corresponding to computations
The function of machine LBA segment numbers of corresponding firmware LBA sections in the NameSpace specified;If it is judged that being yes, then refer to
Show that the first Tip element works;
First Tip element, is used for:The prompting message of main frame LBA mistakes is returned to main frame.
A kind of device for handling more NameSpace LBA provided in an embodiment of the present invention, determines that main frame LBA refers to more than instruction
In fixed NameSpace after firmware LBA total number, it can also include:
Second Tip element, is used for:Determine that main frame LBA is more than total of firmware LBA in the NameSpace specified
After number, the prompting message of main frame LBA mistakes is returned to mobile terminal set in advance.
The explanation of relevant portion refers to this in a kind of device for handling more NameSpace LBA provided in an embodiment of the present invention
The detailed description of corresponding part, will not be repeated here in a kind of method for the more NameSpace LBA of processing that inventive embodiments provide.
In addition, portion consistent with corresponding to technical scheme realization principle in the prior art in above-mentioned technical proposal provided in an embodiment of the present invention
Divide and unspecified, in order to avoid excessively repeat.
The foregoing description of the disclosed embodiments, those skilled in the art are enable to realize or using the present invention.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and generic principles defined herein can
Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited
The embodiments shown herein is formed on, and is to fit to consistent with principles disclosed herein and features of novelty most wide
Scope.
Claims (10)
- A kind of 1. method for handling more NameSpace LBA, it is characterised in that including:A NameSpace in multiple NameSpaces, each name are specified in the instruction that Receiving Host is sent, the instruction Space includes multiple firmware LBA sections, and each firmware LBA sections have corresponding segment number, and each firmware LBA section bags Include multiple firmware LBA;The segment number of the corresponding firmware LBA sections in the NameSpace specified of main frame LBA corresponding to the instruction is calculated, The position of firmware LBA corresponding to the main frame LBA is determined in firmware LBA sections corresponding to the segment number, so that main frame is based on being somebody's turn to do The firmware LBA of position correspondence performs the instruction.
- 2. according to the method for claim 1, it is characterised in that calculate main frame LBA corresponding to the instruction in the instruction The segment number of corresponding firmware LBA sections and corresponding firmware LBA position in the NameSpace specified, including:If the firmware LBA quantity that each firmware LBA sections include in the NameSpace specified is equal, by described in As dividend, the firmware LBA each included in the firmware LBA sections number obtains corresponding whole main frame LBA as divisor Number quotient and the remainder, it is the main frame LBA corresponding firmware LBA sections in NameSpace is specified in the instruction to determine the integer quotient Segment number, determine the remainder for the main frame LBA it is described instruction specify NameSpace in corresponding firmware LBA position.
- 3. according to the method for claim 2, it is characterised in that determine the remainder for the main frame LBA in the instruction Specify in NameSpace behind corresponding firmware LBA position, in addition to:If the firmware LBA in the NameSpace specified is continuous, segment number pair corresponding to the main frame LBA is determined The first address for the firmware LBA sections answered, it is determined that representing the remainder of firmware LBA positions corresponding to the main frame LBA and the head Address and be firmware LBA corresponding with the main frame LBA, and firmware LBA is returned into the main frame.
- 4. according to the method for claim 3, it is characterised in that described to determine corresponding to segment number corresponding to the main frame LBA The first address of firmware LBA sections, including:The first address of firmware LBA sections corresponding to segment number corresponding with the main frame LBA is determined according to the following formula:What the first address of firmware LBA sections corresponding to the main frame LBA=segment number corresponding to main frame LBA × described was specified The number for the firmware LBA that each firmware LBA sections include in NameSpace.
- 5. according to the method described in claim any one of 1-4, it is characterised in that after the instruction that Receiving Host is sent, meter Main frame LBA corresponding to the instruction is calculated in the NameSpace specified before the segment number of corresponding firmware LBA sections, also Including:Judge whether the main frame LBA is more than the total number of firmware LBA in the NameSpace specified, if it is determined that knot Fruit is no, then it is corresponding solid in the NameSpace specified to perform main frame LBA corresponding to the calculating instruction The step of segment number of part LBA sections;If it is judged that being yes, then the prompting message of main frame LBA mistakes is returned to main frame.
- 6. according to the method for claim 5, it is characterised in that determine that the main frame LBA is more than described specify In NameSpace after firmware LBA total number, in addition to:The prompting message of main frame LBA mistakes is returned to mobile terminal set in advance.
- A kind of 7. device for handling more NameSpace LBA, it is characterised in that including:Receiving unit, it is used for:The instruction that Receiving Host is sent, the instruction specify a name in multiple NameSpaces empty Between, each NameSpace includes multiple firmware LBA sections, and each firmware LBA sections have corresponding segment number, and each The firmware LBA sections include multiple firmware LBA;Computing unit, it is used for:It is corresponding solid in the NameSpace specified to calculate main frame LBA corresponding to the instruction The segment number of part LBA sections, the position of firmware LBA corresponding to the main frame LBA is determined in firmware LBA sections corresponding to the segment number, So that firmware LBA of the main frame based on the position correspondence performs the instruction.
- 8. device according to claim 7, it is characterised in that the computing unit includes:Computation subunit, it is used for:If the firmware that each firmware LBA sections include in the NameSpace specified LBA quantity is equal, and using the main frame LBA as dividend, the firmware LBA each included in the firmware LBA sections number is made For divisor, corresponding integer quotient and the remainder are obtained, determine that the integer quotient specifies name sky for the main frame LBA in the instruction Between in corresponding firmware LBA sections segment number, determine the remainder for the main frame LBA it is described instruction specify NameSpace in it is right The firmware LBA answered position.
- 9. according to the device described in any one of claim 7 or 8, it is characterised in that also include:Judging unit, it is used for:After the instruction that receiving unit receives that the main frame is sent, main frame corresponding to the instruction is calculated LBA judges whether the main frame LBA is more than in the NameSpace specified before the segment number of corresponding firmware LBA sections Firmware LBA total number in the NameSpace specified, if it is judged that being no, it indicates that computing unit performs institute State and calculate main frame LBA segment numbers of corresponding firmware LBA sections in the NameSpace specified corresponding to the instruction Function;If it is judged that it is yes, it indicates that the first Tip element work;First Tip element, is used for:The prompting message of main frame LBA mistakes is returned to main frame.
- 10. device according to claim 9, it is characterised in that also include:Second Tip element, is used for:Determine that the main frame LBA is more than firmware LBA in the NameSpace specified After total number, the prompting message of main frame LBA mistakes is returned to mobile terminal set in advance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656115.XA CN107391394A (en) | 2017-08-03 | 2017-08-03 | A kind of method and device for handling more NameSpace LBA |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656115.XA CN107391394A (en) | 2017-08-03 | 2017-08-03 | A kind of method and device for handling more NameSpace LBA |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107391394A true CN107391394A (en) | 2017-11-24 |
Family
ID=60344855
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710656115.XA Pending CN107391394A (en) | 2017-08-03 | 2017-08-03 | A kind of method and device for handling more NameSpace LBA |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391394A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020164216A1 (en) * | 2019-02-13 | 2020-08-20 | 山东华芯半导体有限公司 | Method for assigning namespace lba for use in nvme ssd controller and mapping method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104516822A (en) * | 2013-09-29 | 2015-04-15 | 华为技术有限公司 | Memory access method and device |
CN105051672A (en) * | 2013-03-14 | 2015-11-11 | 微软技术许可有限责任公司 | Data storage volume having tiers of different storage traits |
CN105103114A (en) * | 2013-03-14 | 2015-11-25 | 微软技术许可有限责任公司 | Data storage, file and volume system providing multiple tiers |
US20160342463A1 (en) * | 2015-05-20 | 2016-11-24 | Kabushiki Kaisha Toshiba | Data protection in a namespace |
-
2017
- 2017-08-03 CN CN201710656115.XA patent/CN107391394A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105051672A (en) * | 2013-03-14 | 2015-11-11 | 微软技术许可有限责任公司 | Data storage volume having tiers of different storage traits |
CN105103114A (en) * | 2013-03-14 | 2015-11-25 | 微软技术许可有限责任公司 | Data storage, file and volume system providing multiple tiers |
CN104516822A (en) * | 2013-09-29 | 2015-04-15 | 华为技术有限公司 | Memory access method and device |
US20160342463A1 (en) * | 2015-05-20 | 2016-11-24 | Kabushiki Kaisha Toshiba | Data protection in a namespace |
Non-Patent Citations (2)
Title |
---|
厦门大学数据库实验室 林子雨: "第3章 闪存转换层", 《HTTP://DBLAB.XMU.EDU.CN/POST/4548/》 * |
梁久忠,梁新元,丁宣浩: "《学科建设:计算机网络学科研究》", 31 August 2007 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020164216A1 (en) * | 2019-02-13 | 2020-08-20 | 山东华芯半导体有限公司 | Method for assigning namespace lba for use in nvme ssd controller and mapping method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101051368B (en) | Method and system for deploying flexible attribute in workflow processing systems | |
CN104346267B (en) | Generate the method and device of bugs location information | |
CN107229474B (en) | Method and device for rapidly configuring Java interface and chart service based on visual interface | |
CN105094852A (en) | Tool for importing and exporting data EXCEL | |
CN102799640A (en) | Page loading device and page loading method | |
CN102402369A (en) | Electronic equipment and method for moving operation prompt identifier thereof | |
CN103248769B (en) | A kind of delivery system and method thereof of carrying out path optimization based on iPhone mobile phone | |
CN102279816A (en) | LCD (liquid crystal display) automatic identification method and device | |
CN107291745B (en) | Data index management method and device | |
EP3543858B1 (en) | Method for checking and compiling system start-up files | |
CN109799985A (en) | Front-end code generation method and device, storage medium and electronic equipment | |
CN104503957A (en) | Formula graph automatic generation method and device | |
CN107665187A (en) | A kind of method and apparatus for judging mobile device application interface and whether changing | |
CN103542807B (en) | A kind of length measurement method, device and electronic equipment | |
CN107391394A (en) | A kind of method and device for handling more NameSpace LBA | |
JP2019505050A (en) | Method and apparatus for initial setting of two-dimensional code | |
CN113407254B (en) | Form generation method and device, electronic equipment and storage medium | |
CN105846002B (en) | A kind of charging method and mobile terminal of mobile terminal | |
CN105404663A (en) | Android device file list display method and system | |
CN103246575B (en) | Valid software code quantity calculation method and device | |
CN105302567A (en) | Device and method for dynamically generating report template | |
CN105389093A (en) | Alert identification eliminating method and mobile terminal | |
CN112926221B (en) | Mechanical icon annotation method and device and electronic equipment | |
CN103440103B (en) | The figure speckle guided based on multi-point touch screen portable device builds and modification method | |
US9678748B2 (en) | Methods, systems and computer-readable media for managing a local stack |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171124 |
|
RJ01 | Rejection of invention patent application after publication |