DEVICE AND STORAGE MEDIUM FOR, AND METHOD OF STORING OF DATA SHARABLE BY DIFFERENT FILE SYSTEMS
The invention relates to a device for storing data and data structures on a storage medium, the data comprising a first part, each data structure comprising file and directory entries pointing to the data in accordance with rules of a corresponding file system, the device comprising writing means for storing the data, for storing a first data structure in a first administrative area of a first file system and for storing a second data structure in a second administrative area of a second file system and; - controlling means for generating the data structures and controlling the writing means.
The invention further relates to a storage medium for storing of data and data structures, the data comprising a first part, each data structure comprising file and directory entries pointing to the data in accordance with rules of a corresponding file system, the storage medium comprising a first administrative area of a first file system, for storing a first data structure and; a second administrative area of a second file system, for storing a second data structure. The invention also relates to a method of storing of data and data structures on a storage medium, the data comprising a first part, each data structure comprising file and directory entries pointing to the data in accordance with rules of a corresponding file system, the method comprising steps of: - generating a first data structure; generating a second data structure; - storing a first data structure in a first administrative area of a first file system and; storing a second data structure in a second administrative area of a second file system. The invention further relates to a computer program product for storing data and data structures.
Storage media like optical discs (DVD+RW, Blu-Ray, etc.) are capable of storing large amount of data of different types. They can be used in different environments having specific requirements as for organization of data on a storage medium. Typically, data are organized into files in accordance with rules of a particular file system. Such file system has its own data structure, which includes information about all kind of structures relating to data stored on a storage medium. In particular, a data structure may include volume structures representing the structures of logical and/or physical volumes, file structures representing the structures of files containing the data, directory structures describing grouping of files, and a space bitmap representing allocated or unallocated space for storing data on a storage medium. A data structure is stored on a storage medium in an administrative area of a file system. A storage medium may comprise addressable recording units for storing the data. At a level of a file system those units are referenced to with use of logical addresses defining addressing space. Partitioning of a storage medium allocates a space on the medium for storing data under control (according to rules) of a file system. At present, for example, DVD+RW discs are in use by Consumer Electronics (CE) devices and in the Personal Computer (PC) environment. In the CE environment DVD+RW discs are used mainly for recording digital video information according to a specific format. This means that there are defined specified allocation rules and set of files containing the video information itself and information about that video information such as title information, menu structures, etc. The PC environment is based on a different philosophy. There are, in principle, no allocation requirements. Specific applications may require some files to be present in a certain directory and specific application will typically have their own data format to store information in files or to retrieve information from a file. This means that as long as there is free space available on a medium it is possible to add data files to that medium from all kinds of different applications. As an example, on a single disc there could be multi-media files, text files and executable files all mixed with each other. Recently, more and more CE devices, like video players/recorders, have capability to seek through the file system information on the disc for files of a certain type that they can handle as well. Example of this are (mainly) JPEG files and also, already more and more, MP3 files. In the future possibly more types of multi-media files will be supported in the CE world. Next to that, also new standards on meta-data are created (such as e.g. MPV or HighMAT) designed to make it easier to move digital content between PCs and home electronics devices.
The published international patent application WO 2002/086729 discloses a device for recording data, capable of storing data structures of different file systems on one storage medium, so-called "bridge medium". This facilitates sharing of the bridge medium between different environments, e.g. the CE environment and the PC environment. The data structure of a first file system is mirrored in equivalents of a second file system. After addition (modification) of the data on the bridge medium (bridge disc), the data structures must be synchronized by means of so-called "bridge application". This may lead to undesired effect as, in some cases, synchronization performed by the bridge application can take a substantial amount of time. Therefore, it is an object of the invention to provide more economic way of sharing the medium between different environments. This object is achieved, according to a first aspect of the invention, by a device for storing data of the type described in the opening paragraph, characterized in that the controlling means are adapted to generate the first data structure comprising file and directory entries pointing to only the first part of the data. This allows for selective creation of the data structures, thus decreasing the need for mirroring of the data structures by the bridge application. The medium is sharable by different environments, but file systems corresponding to those environments have different views of the data. In an embodiment of the device for storing data, the controlling means are adapted so only the first data structure comprises file and directory entries pointing to the first part of the data. This embodiment is advantageous in that it further decreases the need for mirroring of the data structures by the bridge application; file and directory entries pointing to the first part of the data do not have to be mirrored in equivalents of the second file system. In a further embodiment of the device for storing data, the controlling means are adapted to define a partition for the first file system, on the storage medium, said partition having a logical address space smaller than a logical address space of the storage medium. This protects the data outside that partition from being erased, during operations performed under control of the first file system. In another embodiment of the device for storing data, the controlling means are adapted to define partitions for the second file system, on the storage medium, so at least one of said partitions is outside the partition for the first file system. This is advantageous in that it provides the storage medium with an area for storing data shareable between two file
systems and, at the same time, reserves some space for use under control of only one file system. It is advantageous, if the controlling means are adapted to define the partition for the first file system as only read-accessible under control of the second file system. This protects the data stored under control of the first file system from being erased, during operations performed under control of the second file system. A further embodiment of the device for storing data is characterized in that the controlling means are adapted to define part of the storage medium as a spare area for the data. This increases effectiveness of data storing and makes the storage medium shareable also by devices employing defect management schemes such as Mount Rainier (e.g. CD- MRW). According to a second aspect of the invention a storage medium for storing of data and data structures of the type described in the opening paragraph is provided, wherein the first data structure comprises file and directory entries pointing to only the first part of the data. According to a third aspect of the invention a method of storing of data and data structures of the type described in the opening paragraph is provided characterized by generating the first data structure comprising file and directory entries pointing to only the first part of the data. According to a fourth aspect of the invention a computer program product for storing data and data structures is provided, which program is operative to cause a processor to perform the method as described in relation to the third aspect of the invention. These and other aspects of the invention will be apparent from and elucidated further with reference to the embodiments described by way of example in the following description and with reference to the accompanying drawings, in which:
Figure la shows a storage medium (top view), Figure lb shows a storage medium (cross section), Figure 2 shows a device for storing data, in accordance with the invention. Figure 3 shows two examples of partitioning of a storage medium, in accordance with the invention. Figure 4 shows an example of a layout of a storage medium, in accordance with the invention.
Figure 5 shows an example of a method of storing data and data structures, in accordance with the invention. Corresponding elements in different Figures have identical reference numerals.
Figure la shows an example of a storage medium 11 having a form of disc with a track 9 and a central hole 10. The track 9, being the position of the series of (to be) recorded marks representing information (data), is arranged in accordance with a spiral pattern of turns constituting substantially parallel tracks on an information layer. The storage medium may be optically readable, called an optical disc, and has an information layer of a recordable type. Examples of a recordable disc are the CD-RW, and writable versions of DVD, such as DVD+RW, and the high density writable optical disc using blue lasers, called Blu-ray Disc (BD). The information (data) is represented on the information layer by recording optically detectable marks along the track, e.g. crystalline or amorphous marks in phase change material. The track 9 on the recordable type of storage medium is indicated by a pre-embossed track structure provided during manufacture of the blank storage medium. The track structure is constituted, for example, by a pregroove 14, which enables a read/write head to follow the track during scanning. The track structure comprises position information, e.g. addresses, for indication the location of units of information, usually called information blocks. Figure lb is a cross-section taken along the line b-b of the storage medium 11 of the recordable type, in which a transparent substrate 15 is provided with a recording layer 16 and a protective layer 17. The protective layer 17 may comprise a further substrate layer, for example as in DVD where the recording layer is at a 0.6 mm substrate and a further substrate of 0.6 mm is bonded to the back side thereof. The pregroove 14 may be implemented as an indentation or an elevation of the substrate 15 material, or as a material property deviating from its surroundings. Figure 2 shows a device for storing data and data structures on a storage medium 1 1 such as CD-RW, DVD+RW or BD, in accordance with the invention. The device is provided with writing means for scanning the track on the storage medium, which means include a drive unit 21 for rotating the storage medium 11, a head 22, and a positioning unit 25 for coarsely positioning the head 22 in the radial direction on the track. The head 22 comprises an optical system of a known type for generating a radiation beam 24 guided
through optical elements focused to a radiation spot 23 on a track of the information layer of the storage medium. The radiation beam 24 is generated by a radiation source, e.g. a laser diode. The head further comprises (not shown) a focusing actuator for moving the focus of the radiation beam 24 along the optical axis of said beam and a tracking actuator for fine positioning of the spot 23 in a radial direction on the center of the track. The tracking actuator may comprise coils for radially moving an optical element or may alternatively be arranged for changing the angle of a reflecting element. For writing information (data) the radiation is controlled to create optically detectable marks in the recording layer. The marks may be in any optically readable form, e.g. in the form of areas with a reflection coefficient different from their surroundings, obtained when recording in materials such as dye, alloy or phase change material, or in the form of areas with a direction of magnetization different from their surroundings, obtained when recording in magneto-optical material. For reading the radiation reflected by the information layer is detected by a detector of a usual type, e.g. a four- quadrant diode, in the head 22 for generating a read signal and further detector signals including a tracking error and a focusing error signal for controlling said tracking and focusing actuators. The read signal is processed by read processing unit 30 of a usual type including a demodulator, deformatter and output unit to retrieve the information (data). Hence retrieving means for reading information include the drive unit 21, the head 22, the positioning unit 25 and the read processing unit 30. The device comprises write processing means for processing the input information (data) to generate a write signal to drive the head 22, which means comprise an input unit 27, and modulator means comprising a formatter 28 and a modulator 29. The input information (data) may comprise for example real-time video and/or audio data or still images data. The input unit 27 processes the input data to unit of information, which are passed to the formatter 28 for adding control data and formatting the data, e.g. by adding error correction codes (ECC) and/or interleaving. For computer applications units of information may be interfaced to the formatter 28 directly - in such case, as an option, the input unit 27 does not have to be present in the device. The formatted data from the output of the formatter 28 is passed to the modulation unit 29, which comprises for example a channel coder, for generating a modulated signal, which drives the head 22. Further the modulation unit 29 comprises synchronizing means for including synchronizing patterns in the modulated signal. The formatted units presented to the input of the modulation unit 29 comprise address information and are written to corresponding addressable locations on the storage medium under the control of control unit 20. Further, the device comprises a control unit 20, which controls the recording and retrieving of information and may be
arranged for receiving commands from a user or from a host computer. The control unit 20 is connected via control lines 26, e.g. a system bus, to said input unit 27, formatter 28 and modulator 29, to the read processing unit 30, and to the drive unit 21, and the positioning unit 25. The control unit 20 comprises control circuitry, for example a microprocessor, a program memory and control gates, for performing the procedures and functions according to the invention as described below. The control unit 20 may also be implemented as a state machine in logic circuits. The control unit 20 controls storing the data on the storage medium in accordance with rules of a particular file system. Such file system has its own data structure, which includes information about different kinds of structures relating to data stored on the medium. In particular, a data structure may include volume structures representing the structures of logical and/or physical volumes, file structures (entries) representing the structures of files containing the data, directory structures (entries) describing grouping of files, and a space bitmap representing allocated or unallocated space for storing data on the medium. A data structure corresponding to a particular file system is generated by the control unit 20 and then stored (updated) on the storage medium in an administrative area of the file system, by the writing means under the control of the control unit 20. Further, the control unit 20 is capable of generating data structures corresponding to two, or more, file systems; these data structures are then stored in administrative areas of respective file systems. This facilitates sharing of the storage medium ("bridge medium") between different environments using different file systems, e.g. the CE environment and the PC environment; the control unit 20 functions as so-called "bridge application". File and directory entries comprised in the data structure of one file system are mirrored in equivalents of other data structure belonging to other file system. Only file and directory entries are mirrored, not the data themselves. On a DVD+RW disc a lot of files of all kind of different types can be stored.
DVD+RW discs are at present in use in the CE environment and in the PC environment. In the CE environment the (video) files should be stored according to the DVD Video Recording (DVD+VR) format. Next to that more and more DVD players (and recorders) do have the functionality to find JPEG files (and also MP3 files) on a disc and are capable of presenting them to the user in a controlled way. In the PC environment additional files on the disc may be accessed. Further, the control unit 20 is adapted to selectively mirror file and directory entries pointing to only a part of the data on the storage medium. For example, a first file system can be a file system as used in the CE environment, such as ISO9660, UDF1.02 or
Blu-Ray Disc File System (BD-FS). A second file system can be specific for the PC environment. It should be noted, that both file systems may be of the same type, e.g. UDF1.02. It is also possible that in one environment both file systems can be used. The control unit 20 can generate a first data structure corresponding to the first file system, which data structure comprises file and directory entries pointing to only a first part of the data on the storage medium. Generally, for a purpose of generating different data structures, the data can be considered as comprising parts in dependence of file systems corresponding to different environments. In the above example, the first part of the data is the part comprising video/audio files and/or graphics files, which can be accessed in the CE environment. Thus, a storage medium is obtained that is sharable by different environments; file systems corresponding to those environments have different views of the data on the storage medium. The first data structure can be generated for the data stored/modified in the PC environment (under control of the second file system). In an embodiment, the control unit 20 is adapted to generate data structures automatically, for example using a pre-defined set of file types, file systems characteristics or other conditions to selectively mirror the data structures. In an embodiment, the control unit 20 is modified to perform a method of storing data and data structures, as described in reference to figure 5. In other embodiment, the control unit 20 is capable of generating data structures in response/according to commands from a user or from a host computer. In an embodiment, the control unit 20 is adapted to generate data structures in such a way that only one data structure (e.g. the first data structure as described above) comprises file and directory entries pointing to a specific part of the data (e.g. the first part of the data as described above). A storage medium comprises addressable recording units for storing the data. At a level of a file system those units are referenced to with use of logical addresses defining addressing space. Partitioning of the storage medium allocates a space on the medium for storing data under control (according to rules) of a file system. In a further embodiment, the control unit 20 is adapted to define a partition for the first file system in such a way that its logical address space is smaller than a logical address space of the medium. The control unit 20 can also be adapted to define more than one partition for the second file system with at least one of those partitions being outside the partition for the first file system. This is schematically illustrated in figure 3 for a case where the first file system is BD-FS and the second file system is UDF. In this example the BD-FS volume
comprises one partition PI , whereas the UDF volume has two partitions - PI and P2. In addition there is a reserved area R for other file systems, within the BD-FS volume. That area can be used by UDF file system. In embodiment, the control unit 20 is adapted to define part of the medium as a spare area S for the data, as schematically illustrated in figure 3b. The spare area S can be employed in defect management schemes such as Mount Rainier (e.g. CD-MRW). The Mount Rainier "enabled" device can use the spare area S for storing the data under control of UDF file system in case of defects on the medium. Logical address space of the spare area S can correspond to one or more locations on the storage medium. In an embodiment of the device for storing data, the control unit 20 is adapted to define the partition for the first file system (e.g. PI in figure 3) as only read-accessible under control of the second file system. Referring to figure 3, the UDF volume comprises two partitions: PI - the BD-FS volume except the reserved area R, and P2 - the rest of the available medium space. PI is read-only area for UDF, P2 - read/write area. In one situation (figure 3a) no spare area is used for storing UDF files (NUDF = NDISC), whereas in another situation (figure 3b) some spare area is defined for the UDF read/write area (NUDF + Ns =
NDISC). NDISC » NUDF , NBD-FS and Ns indicate size of addressing space of the storage medium, the UDF partitions, the BD-FS partition and the spare area, respectively. Partition PI is readonly for UDF so the BD-FS files won't be overwritten under control of UDF. On the other hand, partition P2 can not be used by BD-FS to store files - the UDF files are not overwritten under control of BD-FS. Figure 4 shows an example of a layout of a storage medium, in accordance with the invention. In this example partitions for two file systems (UDF and BD-FS) are present on the storage medium. The medium comprises reserved areas Rl and R2. The area Rl is reserved for use by BD-FS; the area R2 is reserved for use by other file system, in this example UDF. The area Rl comprises at least a part of an administrative area of BD-FS
(referred to as Management Information Area - MIA), in which a data structure of BD-FS is stored. In the area Rl also other files, such as audio/video navigation files, relating to management of data comprised in a partition for BD-FS are stored. These files are referred to as "gathered" files and are indicated by G in figure 4. Files RT containing real-time audio/video data can be stored on such medium under control of BD-FS, by e.g. CE devices. The area R2 comprises at least a part of an administrative area of UDF, in which a data structure of UDF is stored. Data stored under control of UDF and placed in the part of the UDF volume, which is outside the BD-FS volume, and are indicated by U in figure 4. These
data can be also stored in the area on the storage medium, which is common for both volumes. A medium having characteristics shown in figure 3 or figure 4 can be realized by the device for storing data as described above. The initialization of the medium by the device (working in e.g. the PC environment) comprises following steps: defining the size of the BD-FS volume NBD-FS (this can be menu driven, the default size of the BD-FS volume is not anymore equal to the whole address space of the medium NDιsc , enough space is reserved for the UDF read/write area in partition P2); - storing the File Set Descriptor (FSD) for BD-FS; - storing the MIA; - storing the Anchor Volume Descriptor Pointer (AVDP) for UDF (pointing to the data structure of UDF); storing descriptors for partitioning, the FSD, the root directory descriptor for UDF. During operation of the video recorder (the CE environment) audio/video files, "gathered" files are stored and the MIA is updated. Optionally, the consistency check application translates the MIA tables into the UDF descriptors, which are stored in the UDF read/write area. If the storage medium is put back in the PC environment, a consistency check should be carried out, i.e. a check whether file and directory entries (comprised in the MIA) of BD-FS are reflected in file and directory entries of UDF. Every entry in the MIA should be checked, as in the MIA tables there is no field for indicating that one of the entries has been changed. Optionally, an Implementation Use descriptor in the MIA can be used for checking change of entries. It should be noted that for data stored in the partition P2 no consistency check is required as those data are stored under control of UDF only and are not accessible under control of BD-FS. Figure 5 shows an embodiment of a method of storing data and data structures, in accordance with the invention. In step 103 data are stored on a storage medium. In step 104 a first data structure and a second data structure are generated comprising file and directory entries pointing to the data. These data structures are stored (updated) on a storage medium in administrative areas of corresponding file systems in step 105. According to the invention, the step 104 is modified so the first data structure comprises file and directory entries pointing to only a part of the data. More specifically, after the data is stored (step 103), the second data structure is generated in accordance with rules of the second file system
(step 104). Consecutively, entries comprised in the second data structure are analyzed and selectively mirrored in equivalents of the first file system, i.e. entries comprised in the first data structure. Thus, the first data structure is generated comprising entries pointing to only the part of the data. The selection can be based on different criteria such as file types or file systems characteristics. It should be noted that steps 103, 104 and 105 can be interchanged. In one embodiment of the method, preferably, the first administrative area, e.g. MIA, is updated after the second administrative area, e.g. UDF structure area is built in order to mark space occupied by the second administrative area, in particular by using a disc record chain. Thus, it is prevented, that sectors of the storage medium allocated to the administrative area of the second file system are accessed by the first file system. Furthermore, preferably, both, the administrative area of the first file system and the administrative area of the second file system are updated or rebuilt in step 105 after data and/or file modification carried out in step 103 under control of the second file system. This is convenient in order to allow editing of audio/video recordings and files stored under control of e.g. UDF. BD-FS - UDF consistency can be restored after the UDF data structure has been modified by determining the modifications applied to the UDF data structure since the BD-FS data structure was updated and applying only these modifications to the BD-FS data structure. In another embodiment step 104 is modified so only the first data structure comprises file and directory entries pointing to the first part of the data. In this case there is no mirroring of entries between data structures. Moreover, the first data structure and the second data structure can be generated separately. The method can be further modified to comprise a step 101 of defining a partition for the first file system on the storage medium. A logical address space of this partition is smaller than a logical address space of the storage medium. Yet another embodiment of the method comprises additional step 102 in which partitions for the second file system are defined on the storage medium. This is done in such a way that at least one of said partitions is outside the partition for the first file system as explained in reference to figures 3 and 4. In an embodiment, the step 101 is modified to define the partition for the first file system as only read-accessible under control of the second file system as explained in reference to figures 3 and 4.
Whilst the invention has been described with reference to preferred embodiments thereof, it is to be understood that these are not limitative examples. Thus, various modifications may become apparent to those skilled in the art, without departing from the scope of the invention, as defined by the claims. Further, the invention lies in each and every novel feature or combination of features described above. Also, for the storage medium an optical disc has been described, but other media, such as a magneto-optical disc or magnetic tape, can be used. It is noted, that the invention may be implemented by means of a general purpose processor executing a computer program or by dedicated hardware or by a combination of both, and that in this document the word "comprising" does not exclude the presence of other elements or steps than those listed and the word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements, that any reference signs do not limit the scope of the claims, that "means" may be represented by a single item or a plurality and that several "means" may be represented by the same item of hardware.