OSD changes for 2.6.31
PATCH 1/1 OSD changes for 2.6.31
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums
[PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let _osd_req_finalize_data_integrity receive number of out_bytes [PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameter
These are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an osd_dev wrapper to retrieve the request_queue
Simple wrapper
[PATCH 08/10] osduld: use filp_open() when looking up an osd-device
This patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review
[PATCH 09/10] libosd: Use REQ_QUIET requests.
Recent scsi_lib changes, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "== RECOVERED_ERROR")
Use of a REQ_QUIET flag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.
[PATCH 10/10] osd: Remove out-of-tree left overs
log stat
drivers/scsi/osd/Kbuild | 25 ----------- drivers/scsi/osd/Makefile | 37 ----------------- drivers/scsi/osd/osd_initiator.c | 83 +++++++++++++++++++++++++++----------- drivers/scsi/osd/osd_uld.c | 66 ++++++++++++++---------------- fs/exofs/common.h | 6 --- fs/exofs/inode.c | 8 ++-- fs/exofs/osd.c | 26 ------------ include/scsi/osd_attributes.h | 74 +++++++++++++++++++++++++++++++++- include/scsi/osd_initiator.h | 14 +++++- include/scsi/osd_protocol.h | 8 ++++ 10 files changed, 185 insertions(+), 162 deletions(-) delete mode 100755 drivers/scsi/osd/Makefile
These patches are available in the git repository at:
git://git.open-osd.org/linux-open-osd.git osd-devel
Thanks
Boaz
PATCH RESEND 1/10 libosd: OSD2r05: Additional command enums
Add all constant definitions of new OSD commands added in revision 4 & 5. Mainly for creating snapshots and clones.
--- include/scsi/osd_protocol.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
include/scsi/osd_protocol.h +8 -0
@@ -303,7 +303,15 @@ enum osd_service_actions { OSD_ACT_V2(REMOVE_MEMBER_OBJECTS, 0x21) OSD_ACT_V2(GET_MEMBER_ATTRIBUTES, 0x22) OSD_ACT_V2(SET_MEMBER_ATTRIBUTES, 0x23) + + OSD_ACT_V2(CREATE_CLONE, 0x28) + OSD_ACT_V2(CREATE_SNAPSHOT, 0x29) + OSD_ACT_V2(DETACH_CLONE, 0x2A) + OSD_ACT_V2(REFRESH_SNAPSHOT_CLONE, 0x2B) + OSD_ACT_V2(RESTORE_PARTITION_FROM_SNAPSHOT, 0x2C) + OSD_ACT_V2(READ_MAP, 0x31) + OSD_ACT_V2(READ_MAPS_COMPARE, 0x32) OSD_ACT_V1_V2(PERFORM_SCSI_COMMAND, 0x8F7E, 0x8F7C)OSD_ACT_V1_V2 (SCSI_TASK_MANAGEMENT ,0x8F7F ,0x8F7D )
Signature · 1 line
1.6.2.1
PATCH RESEND 2/10 libosd: OSD2r05: Attribute definitions
In reply to Boaz HarroshSome New revision 5 Attribute definitions.
Some missing definitions of Attributes and pages
--- include/scsi/osd_attributes.h | 74 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 72 insertions(+), 2 deletions(-)
include/scsi/osd_attributes.h +72 -2
@@ -29,6 +29,7 @@ enum {OSD_APAGE_PARTITION_INFORMATION =OSD_APAGE_PARTITION_FIRST +1 ,OSD_APAGE_PARTITION_QUOTAS =OSD_APAGE_PARTITION_FIRST +2 ,OSD_APAGE_PARTITION_TIMESTAMP =OSD_APAGE_PARTITION_FIRST +3 , +OSD_APAGE_PARTITION_ATTR_ACCESS =OSD_APAGE_PARTITION_FIRST +4 ,OSD_APAGE_PARTITION_SECURITY =OSD_APAGE_PARTITION_FIRST +5 , OSD_APAGE_PARTITION_LAST = 0x5FFFFFFF,
@@ -51,7 +52,9 @@ enum {OSD_APAGE_RESERVED_TYPE_LAST =0xEFFFFFFF ,OSD_APAGE_COMMON_FIRST =0xF0000000 , -OSD_APAGE_COMMON_LAST =0xFFFFFFFE , +OSD_APAGE_COMMON_LAST =0xFFFFFFFD , + +OSD_APAGE_CURRENT_COMMAND =0xFFFFFFFE , OSD_APAGE_REQUEST_ALL = 0xFFFFFFFF, };
@@ -106,10 +109,30 @@ enum {OSD_ATTR_RI_PRODUCT_REVISION_LEVEL =0x7 ,/* 4 */ OSD_ATTR_RI_PRODUCT_SERIAL_NUMBER =0x8 ,/* variable */ OSD_ATTR_RI_OSD_NAME =0x9 ,/* variable */ +OSD_ATTR_RI_MAX_CDB_CONTINUATION_LEN =0xA ,/* 4 */ OSD_ATTR_RI_TOTAL_CAPACITY =0x80 ,/* 8 */ OSD_ATTR_RI_USED_CAPACITY =0x81 ,/* 8 */ OSD_ATTR_RI_NUMBER_OF_PARTITIONS =0xC0 ,/* 8 */ OSD_ATTR_RI_CLOCK =0x100 ,/* 6 */ +OARI_DEFAULT_ISOLATION_METHOD =0X110 ,/* 1 */ +OARI_SUPPORTED_ISOLATION_METHODS =0X111 ,/* 32 */ + +OARI_DATA_ATOMICITY_GUARANTEE =0X120 ,/* 8 */ +OARI_DATA_ATOMICITY_ALIGNMENT =0X121 ,/* 8 */ +OARI_ATTRIBUTES_ATOMICITY_GUARANTEE =0X122 ,/* 8 */ +OARI_DATA_ATTRIBUTES_ATOMICITY_MULTIPLIER =0X123 ,/* 1 */ + +OARI_MAXIMUM_SNAPSHOTS_COUNT =0X1C1 ,/* 0 or 4 */ +OARI_MAXIMUM_CLONES_COUNT =0X1C2 ,/* 0 or 4 */ +OARI_MAXIMUM_BRANCH_DEPTH =0X1CC ,/* 0 or 4 */ +OARI_SUPPORTED_OBJECT_DUPLICATION_METHOD_FIRST =0X200 ,/* 0 or 4 */ +OARI_SUPPORTED_OBJECT_DUPLICATION_METHOD_LAST =0X2ff ,/* 0 or 4 */ +OARI_SUPPORTED_TIME_OF_DUPLICATION_METHOD_FIRST =0X300 ,/* 0 or 4 */ +OARI_SUPPORTED_TIME_OF_DUPLICATION_METHOD_LAST =0X30F ,/* 0 or 4 */ +OARI_SUPPORT_FOR_DUPLICATED_OBJECT_FREEZING =0X310 ,/* 0 or 4 */ +OARI_SUPPORT_FOR_SNAPSHOT_REFRESHING =0X311 ,/* 0 or 1 */ +OARI_SUPPORTED_CDB_CONTINUATION_DESC_TYPE_FIRST =0X7000001 ,/* 0 or 4 */ + OARI_SUPPORTED_CDB_CONTINUATION_DESC_TYPE_LAST = 0X700FFFF,/* 0 or 4 */ };/* Root_Information_attributes_page does not have a get_page structure */
@@ -120,7 +143,15 @@ enum {OSD_ATTR_PI_PARTITION_ID =0x1 ,/* 8 */ OSD_ATTR_PI_USERNAME =0x9 ,/* variable */ OSD_ATTR_PI_USED_CAPACITY =0x81 ,/* 8 */ +OSD_ATTR_PI_USED_CAPACITY_INCREMENT =0x84 ,/* 0 or 8 */ OSD_ATTR_PI_NUMBER_OF_OBJECTS =0xC1 ,/* 8 */ + +OSD_ATTR_PI_ACTUAL_DATA_SPACE =0xD1 ,/* 0 or 8 */ +OSD_ATTR_PI_RESERVED_DATA_SPACE =0xD2 ,/* 0 or 8 */ +OSD_ATTR_PI_DEFAULT_SNAPSHOT_DUPLICATION_METHOD =0x200 ,/* 0 or 4 */ +OSD_ATTR_PI_DEFAULT_CLONE_DUPLICATION_METHOD =0x201 ,/* 0 or 4 */ +OSD_ATTR_PI_DEFAULT_SP_TIME_OF_DUPLICATION =0x300 ,/* 0 or 4 */ + OSD_ATTR_PI_DEFAULT_CLONE_TIME_OF_DUPLICATION = 0x301,/* 0 or 4 */ };/* Partition Information attributes page does not have a get_page structure */
@@ -131,6 +162,7 @@ enum {OSD_ATTR_CI_PARTITION_ID =0x1 ,/* 8 */ OSD_ATTR_CI_COLLECTION_OBJECT_ID =0x2 ,/* 8 */ OSD_ATTR_CI_USERNAME =0x9 ,/* variable */ +OSD_ATTR_CI_COLLECTION_TYPE =0xA ,/* 1 */ OSD_ATTR_CI_USED_CAPACITY = 0x81, /* 8 */ };/* Collection Information attributes page does not have a get_page structure */
@@ -144,6 +176,8 @@ enum {OSD_ATTR_OI_USERNAME =0x9 ,/* variable */ OSD_ATTR_OI_USED_CAPACITY =0x81 ,/* 8 */ OSD_ATTR_OI_LOGICAL_LENGTH =0x82 ,/* 8 */ +SD_ATTR_OI_ACTUAL_DATA_SPACE =0XD1 ,/* 0 OR 8 */ + SD_ATTR_OI_RESERVED_DATA_SPACE = 0XD2, /* 0 OR 8 */ };/* Object Information attributes page does not have a get_page structure */
@@ -248,7 +282,18 @@ struct object_timestamps_attributes_page {struct osd_timestamp data_modified_time; } __packed; -/* 7.1.2.19 Collections attributes page */ +/* OSD2r05: 7.1.3.19 Attributes Access attributes page +* (OSD_APAGE_PARTITION_ATTR_ACCESS) +* +* each attribute is of the form below. Total array length is deduced +* from the attribute's length +* (See allowed_attributes_access of the struct osd_cap_object_descriptor) +*/ +struct attributes_access_attr { +struct osd_attributes_list_attrid attr_list[0 ]; +} __packed; + +/* OSD2r05: 7.1.2.21 Collections attributes page */ /* TBD */ /* 7.1.2.20 Root Policy/Security attributes page (OSD_APAGE_ROOT_SECURITY) */
@@ -324,4 +369,29 @@ struct object_security_attributes_page { __be32 policy_access_tag; } __packed; +/* OSD2r05: 7.1.3.31 Current Command attributes page +* (OSD_APAGE_CURRENT_COMMAND) +*/ +enum { +OSD_ATTR_CC_RESPONSE_INTEGRITY_CHECK_VALUE =0x1 ,/* 32 */ +OSD_ATTR_CC_OBJECT_TYPE =0x2 ,/* 1 */ +OSD_ATTR_CC_PARTITION_ID =0x3 ,/* 8 */ +OSD_ATTR_CC_OBJECT_ID =0x4 ,/* 8 */ +OSD_ATTR_CC_STARTING_BYTE_ADDRESS_OF_APPEND =0x5 ,/* 8 */ +OSD_ATTR_CC_CHANGE_IN_USED_CAPACITY =0x6 ,/* 8 */ +}; + +/*TBD: osdv1_current_command_attributes_page */ + +struct osdv2_current_command_attributes_page { +struct osd_attr_page_header hdr;/* id=0xFFFFFFFE, size=0x44 */ +u8 response_integrity_check_value[OSD_CRYPTO_KEYID_SIZE ]; +u8 object_type; +u8 reserved[3 ]; +__be64 partition_id; +__be64 object_id; +__be64 starting_byte_address_of_append; +__be64 change_in_used_capacity; +}; +#endif /*ndef __OSD_ATTRIBUTES_H__*/
Signature · 1 line
1.6.2.1
PATCH RESEND 3/10 libosd: Better printout of OSD target system information
In reply to Boaz HarroshShorten out the Attributes names.
Align all results on column 24.
Print system ID in a new line.
--- drivers/scsi/osd/osd_initiator.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-)
drivers/scsi/osd/osd_initiator.c +12 -11
@@ -118,39 +118,39 @@ static int _osd_print_system_info(struct osd_dev *od, void *caps) _osd_ver_desc(or)); pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_VENDOR_IDENTIFICATION [%s]\n" , +OSD_INFO ("VENDOR_IDENTIFICATION [%s]\n" , (char *)pFirst); pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_PRODUCT_IDENTIFICATION [%s]\n" , +OSD_INFO ("PRODUCT_IDENTIFICATION [%s]\n" , (char *)pFirst); pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_PRODUCT_MODEL [%s]\n" , +OSD_INFO ("PRODUCT_MODEL [%s]\n" , (char *)pFirst); pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_PRODUCT_REVISION_LEVEL [%u]\n" , +OSD_INFO ("PRODUCT_REVISION_LEVEL [%u]\n" , pFirst ?get_unaligned_be32 (pFirst) : ~0U ); pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_PRODUCT_SERIAL_NUMBER [%s]\n" , +OSD_INFO ("PRODUCT_SERIAL_NUMBER [%s]\n" , (char *)pFirst); pFirst = get_attrs[a].val_ptr; -OSD_INFO ("OSD_ATTR_RI_OSD_NAME [%s]\n" , (char *)pFirst); +OSD_INFO ("OSD_NAME [%s]\n" , (char *)pFirst); a++; pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_TOTAL_CAPACITY [0x%llx]\n" , +OSD_INFO ("TOTAL_CAPACITY [0x%llx]\n" , pFirst ?_LLU (get_unaligned_be64 (pFirst)) : ~0ULL ); pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_USED_CAPACITY [0x%llx]\n" , +OSD_INFO ("USED_CAPACITY [0x%llx]\n" , pFirst ?_LLU (get_unaligned_be64 (pFirst)) : ~0ULL ); pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_NUMBER_OF_PARTITIONS [%llu]\n" , +OSD_INFO ("NUMBER_OF_PARTITIONS [%llu]\n" , pFirst ?_LLU (get_unaligned_be64 (pFirst)) : ~0ULL );if (a >= nelem)
@@ -158,7 +158,7 @@ static int _osd_print_system_info(struct osd_dev *od, void *caps)/* FIXME: Where are the time utilities */ pFirst = get_attrs[a++].val_ptr; -OSD_INFO ("OSD_ATTR_RI_CLOCK [0x%02x%02x%02x%02x%02x%02x]\n" , +OSD_INFO ("CLOCK [0x%02x%02x%02x%02x%02x%02x]\n" , ((char *)pFirst)[0 ], ((char *)pFirst)[1 ], ((char *)pFirst)[2 ], ((char *)pFirst)[3 ], ((char *)pFirst)[4 ], ((char *)pFirst)[5 ]);
@@ -169,7 +169,8 @@ static int _osd_print_system_info(struct osd_dev *od, void *caps)hex_dump_to_buffer (get_attrs[a].val_ptr, len,32 ,1 , sid_dump,sizeof (sid_dump), true); -OSD_INFO ("OSD_ATTR_RI_OSD_SYSTEM_ID(%d) [%s]\n" , len, sid_dump); +OSD_INFO ("OSD_SYSTEM_ID(%d)\n" +" [%s]\n" , len, sid_dump); a++; } out:
Signature · 1 line
1.6.2.1
PATCH RESEND 4/10 libosd: osd_req_{read,write}_kern new API
In reply to Boaz HarroshBy popular demand, define usefull wrappers for osd_req_read/write that recieve kernel pointers. All users had their own.
Also remove these from exofs
--- drivers/scsi/osd/osd_initiator.c | 28 ++++++++++++++++++++++++++++ fs/exofs/common.h | 6 ------ fs/exofs/osd.c | 26 -------------------------- include/scsi/osd_initiator.h | 4 ++++ 4 files changed, 32 insertions(+), 32 deletions(-)
drivers/scsi/osd/osd_initiator.c +28 -0
@@ -789,6 +789,20 @@ void osd_req_write(struct osd_request *or, }EXPORT_SYMBOL (osd_req_write); +int osd_req_write_kern (struct osd_request *or, +const struct osd_obj_id *obj,u64 offset,void * buff,u64 len) +{ +struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; +struct bio *bio =bio_map_kern (req_q, buff, len,GFP_KERNEL ); + +if (IS_ERR (bio)) +return PTR_ERR (bio); + +osd_req_write (or, obj, bio, offset); +return 0 ; +} +EXPORT_SYMBOL (osd_req_write_kern); +/*TODO: void osd_req_append(struct osd_request *, const struct osd_obj_id *, struct bio *data_out); */ /*TODO: void osd_req_create_write(struct osd_request *,
@@ -824,6 +838,20 @@ void osd_req_read(struct osd_request *or, }EXPORT_SYMBOL (osd_req_read); +int osd_req_read_kern (struct osd_request *or, +const struct osd_obj_id *obj,u64 offset,void * buff,u64 len) +{ +struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; +struct bio *bio =bio_map_kern (req_q, buff, len,GFP_KERNEL ); + +if (IS_ERR (bio)) +return PTR_ERR (bio); + +osd_req_read (or, obj, bio, offset); +return 0 ; +} +EXPORT_SYMBOL (osd_req_read_kern); +void osd_req_get_attributes (struct osd_request *or,const struct osd_obj_id *obj) {
fs/exofs/common.h +0 -6
@@ -175,10 +175,4 @@ int exofs_async_op(struct osd_request *or,int extract_attr_from_req (struct osd_request *or,struct osd_attr *attr); -int osd_req_read_kern (struct osd_request *or, -const struct osd_obj_id *obj,u64 offset,void *buff,u64 len); - -int osd_req_write_kern (struct osd_request *or, -const struct osd_obj_id *obj,u64 offset,void *buff,u64 len); -#endif /*ifndef __EXOFS_COM_H__*/
fs/exofs/osd.c +0 -26
@@ -125,29 +125,3 @@ int extract_attr_from_req(struct osd_request *or, struct osd_attr *attr)return -EIO ; } - -int osd_req_read_kern (struct osd_request *or, -const struct osd_obj_id *obj,u64 offset,void * buff,u64 len) -{ -struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; -struct bio *bio =bio_map_kern (req_q, buff, len,GFP_KERNEL ); - -if (!bio) -return -ENOMEM ; - -osd_req_read (or, obj, bio, offset); -return 0 ; -} - -int osd_req_write_kern (struct osd_request *or, -const struct osd_obj_id *obj,u64 offset,void * buff,u64 len) -{ -struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; -struct bio *bio =bio_map_kern (req_q, buff, len,GFP_KERNEL ); - -if (!bio) -return -ENOMEM ; - -osd_req_write (or, obj, bio, offset); -return 0 ; -}
include/scsi/osd_initiator.h +4 -0
@@ -364,6 +364,8 @@ void osd_req_remove_object(struct osd_request *or, struct osd_obj_id *);void osd_req_write (struct osd_request *or,const struct osd_obj_id *,struct bio *data_out,u64 offset); +int osd_req_write_kern (struct osd_request *or, +const struct osd_obj_id *obj,u64 offset,void *buff,u64 len);void osd_req_append (struct osd_request *or,const struct osd_obj_id *,struct bio *data_out);/* NI */ void osd_req_create_write(struct osd_request *or,
@@ -379,6 +381,8 @@ void osd_req_flush_object(struct osd_request *or,void osd_req_read (struct osd_request *or,const struct osd_obj_id *,struct bio *data_in,u64 offset); +int osd_req_read_kern (struct osd_request *or, +const struct osd_obj_id *obj,u64 offset,void *buff,u64 len);/* * Root/Partition/Collection/Object Attributes commands
Signature · 1 line
1.6.2.1
PATCH RESEND 5/10 libosd: Let _osd_req_finalize_data_integrity receive number of out_bytes
In reply to Boaz Harrosh_osd_req_finalize_data_integrity was trying to deduce the number of out_bytes from passed osd_request->out.bio. This is wrong when the bio is chained. The caller of _osd_req_finalize_data_integrity has more ready available information and should just pass it.
Also in the light of future support for CDB-continuation segment this is a better solution.
--- drivers/scsi/osd/osd_initiator.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/scsi/osd/osd_initiator.c +5 -4
@@ -1262,7 +1262,7 @@ static inline void osd_sec_parms_set_in_offset(bool is_v1, }static int _osd_req_finalize_data_integrity (struct osd_request *or, -bool has_in,bool has_out,const u8 *cap_key) +bool has_in,bool has_out,u64 out_data_bytes,const u8 *cap_key) {struct osd_security_parameters *sec_parms =_osd_req_sec_params (or);int ret;
@@ -1277,8 +1277,7 @@ static int _osd_req_finalize_data_integrity(struct osd_request *or, };unsigned pad; - or->out_data_integ.data_bytes =cpu_to_be64 ( - or->out.bio ? or->out.bio->bi_size :0 ); + or->out_data_integ.data_bytes =cpu_to_be64 (out_data_bytes); or->out_data_integ.set_attributes_bytes =cpu_to_be64 ( or->set_attr.total_bytes); or->out_data_integ.get_attributes_bytes = cpu_to_be64(
@@ -1370,6 +1369,7 @@ int osd_finalize_request(struct osd_request *or, {struct osd_cdb_head *cdbh =osd_cdb_head (&or->cdb);bool has_in, has_out; +u64 out_data_bytes = or->out.total_bytes;int ret;if (options &OSD_REQ_FUA )
@@ -1439,7 +1439,8 @@ int osd_finalize_request(struct osd_request *or, } } - ret =_osd_req_finalize_data_integrity (or, has_in, has_out, cap_key); + ret =_osd_req_finalize_data_integrity (or, has_in, has_out, + out_data_bytes, cap_key);if (ret)return ret;
Signature · 1 line
1.6.2.1
PATCH RESEND 6/10 libosd: osd_req_{read,write} takes a length parameter
In reply to Boaz HarroshFor supporting of chained-bios we can not inspect the first bio only, as before. Caller shall pass the total length of the request, ie. sum_bytes(bio-chain).
Also since the bio might be a chain we don't set it's direction on behalf of it's callers. The bio direction should be properly set prior to this call. So fix a couple of write users that now need to set the bio direction properly
[In this patch I change both library code and user sites at
exofs, to make it easy on integration. It should be submitted via James's scsi-misc tree.]
--- drivers/scsi/osd/osd_initiator.c | 23 +++++++++++++---------- fs/exofs/inode.c | 5 +++-- include/scsi/osd_initiator.h | 4 ++-- 3 files changed, 18 insertions(+), 14 deletions(-)
drivers/scsi/osd/osd_initiator.c +13 -10
@@ -779,13 +779,14 @@ EXPORT_SYMBOL(osd_req_remove_object);*/ void osd_req_write (struct osd_request *or, -const struct osd_obj_id *obj,struct bio *bio,u64 offset) +const struct osd_obj_id *obj,u64 offset, +struct bio *bio,u64 len) { -_osd_req_encode_common (or,OSD_ACT_WRITE , obj, offset, bio->bi_size); +_osd_req_encode_common (or,OSD_ACT_WRITE , obj, offset, len);WARN_ON (or->out.bio || or->out.total_bytes); - bio->bi_rw |= (1 <<BIO_RW ); +WARN_ON (0 ==bio_rw_flagged (bio,BIO_RW )); or->out.bio = bio; - or->out.total_bytes = bio->bi_size; + or->out.total_bytes = len; }EXPORT_SYMBOL (osd_req_write);
@@ -798,7 +799,8 @@ int osd_req_write_kern(struct osd_request *or,if (IS_ERR (bio))return PTR_ERR (bio); -osd_req_write (or, obj, bio, offset); + bio->bi_rw |= (1 <<BIO_RW );/* FIXME: bio_set_dir() */ +osd_req_write (or, obj, offset, bio, len);return 0 ; }EXPORT_SYMBOL (osd_req_write_kern);
@@ -828,13 +830,14 @@ void osd_req_flush_object(struct osd_request *or,EXPORT_SYMBOL (osd_req_flush_object);void osd_req_read (struct osd_request *or, -const struct osd_obj_id *obj,struct bio *bio,u64 offset) +const struct osd_obj_id *obj,u64 offset, +struct bio *bio,u64 len) { -_osd_req_encode_common (or,OSD_ACT_READ , obj, offset, bio->bi_size); +_osd_req_encode_common (or,OSD_ACT_READ , obj, offset, len);WARN_ON (or->in.bio || or->in.total_bytes); - bio->bi_rw &= ~(1 <<BIO_RW ); +WARN_ON (1 ==bio_rw_flagged (bio,BIO_RW )); or->in.bio = bio; - or->in.total_bytes = bio->bi_size; + or->in.total_bytes = len; }EXPORT_SYMBOL (osd_req_read);
@@ -847,7 +850,7 @@ int osd_req_read_kern(struct osd_request *or,if (IS_ERR (bio))return PTR_ERR (bio); -osd_req_read (or, obj, bio, offset); +osd_req_read (or, obj, offset, bio, len);return 0 ; }EXPORT_SYMBOL (osd_req_read_kern);
fs/exofs/inode.c +3 -2
@@ -266,7 +266,7 @@ static int read_exec(struct page_collect *pcol, bool is_sync) goto err; } -osd_req_read (or, &obj, pcol->bio, i_start); +osd_req_read (or, &obj, i_start, pcol->bio, pcol->length);if (is_sync) {exofs_sync_op (or, pcol->sbi->s_timeout, oi->i_cred);
@@ -522,7 +522,8 @@ static int write_exec(struct page_collect *pcol) *pcol_copy = *pcol; -osd_req_write (or, &obj, pcol_copy->bio, i_start); + pcol_copy->bio->bi_rw |= (1 <<BIO_RW );/* FIXME: bio_set_dir() */ +osd_req_write (or, &obj, i_start, pcol_copy->bio, pcol_copy->length); ret =exofs_async_op (or, writepages_done, pcol_copy, oi->i_cred);if (unlikely (ret)) {EXOFS_ERR ("write_exec: exofs_async_op() Faild\n" );
include/scsi/osd_initiator.h +2 -2
@@ -363,7 +363,7 @@ void osd_req_create_object(struct osd_request *or, struct osd_obj_id *);void osd_req_remove_object (struct osd_request *or,struct osd_obj_id *);void osd_req_write (struct osd_request *or, -const struct osd_obj_id *,struct bio *data_out,u64 offset); +const struct osd_obj_id *obj,u64 offset,struct bio *bio,u64 len);int osd_req_write_kern (struct osd_request *or,const struct osd_obj_id *obj,u64 offset,void *buff,u64 len); void osd_req_append(struct osd_request *or,
@@ -380,7 +380,7 @@ void osd_req_flush_object(struct osd_request *or, /*V2*/ u64 offset, /*V2*/ u64 len);void osd_req_read (struct osd_request *or, -const struct osd_obj_id *,struct bio *data_in,u64 offset); +const struct osd_obj_id *obj,u64 offset,struct bio *bio,u64 len);int osd_req_read_kern (struct osd_request *or,const struct osd_obj_id *obj,u64 offset,void *buff,u64 len);
Signature · 1 line
1.6.2.1
PATCH 7/10 libosd: Define an osd_dev wrapper to retrieve the request_queue
In reply to Boaz Harroshlibosd users that need to work with bios, must sometime use the request_queue associated with the osd_dev. Make a wrapper for that, and convert all in-tree users.
--- drivers/scsi/osd/osd_initiator.c | 6 +++--- fs/exofs/inode.c | 3 +-- include/scsi/osd_initiator.h | 5 +++++ 3 files changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/osd/osd_initiator.c +3 -3
@@ -670,7 +670,7 @@ static int _osd_req_list_objects(struct osd_request *or, __be16 action, const struct osd_obj_id *obj, osd_id initial_id, struct osd_obj_id_list *list, unsigned nelem) { - struct request_queue *q = or->osd_dev->scsi_device->request_queue; + struct request_queue *q = osd_request_queue(or->osd_dev);u64 len = nelem *sizeof (osd_id) +sizeof (*list);struct bio *bio;
@@ -793,7 +793,7 @@ EXPORT_SYMBOL(osd_req_write);int osd_req_write_kern (struct osd_request *or,const struct osd_obj_id *obj,u64 offset,void * buff,u64 len) { -struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; +struct request_queue *req_q =osd_request_queue (or->osd_dev);struct bio *bio =bio_map_kern (req_q, buff, len,GFP_KERNEL );if (IS_ERR (bio))
@@ -844,7 +844,7 @@ EXPORT_SYMBOL(osd_req_read);int osd_req_read_kern (struct osd_request *or,const struct osd_obj_id *obj,u64 offset,void * buff,u64 len) { -struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; +struct request_queue *req_q =osd_request_queue (or->osd_dev);struct bio *bio =bio_map_kern (req_q, buff, len,GFP_KERNEL );if (IS_ERR (bio))
fs/exofs/inode.c +1 -2
@@ -59,10 +59,9 @@ static void _pcol_init(struct page_collect *pcol, unsigned expected_pages, struct inode *inode) {struct exofs_sb_info *sbi = inode->i_sb->s_fs_info; -struct request_queue *req_q = sbi->s_dev->scsi_device->request_queue; pcol->sbi = sbi; - pcol->req_q = req_q; + pcol->req_q =osd_request_queue (sbi->s_dev); pcol->inode = inode; pcol->expected_pages = expected_pages;
include/scsi/osd_initiator.h +5 -0
@@ -18,6 +18,7 @@#include "osd_types.h" #include <linux/blkdev.h> +#include <scsi/scsi_device.h> /* Note: "NI" in comments below means "Not Implemented yet" */
@@ -69,6 +70,10 @@ void osd_dev_fini(struct osd_dev *od);/* some hi level device operations */ int osd_auto_detect_ver (struct osd_dev *od,void *caps);/* GFP_KERNEL */ +static inline struct request_queue *osd_request_queue (struct osd_dev *od) +{ +return od->scsi_device->request_queue; +}/* we might want to use function vector in the future */ static inline void osd_dev_set_ver (struct osd_dev *od,enum osd_std_version v)
Signature · 1 line
1.6.2.1
PATCH 8/10 osduld: use filp_open() when looking up an osd-device
In reply to Boaz HarroshThis patch was inspired by Al Viro, for simplifying and fixing the retrieval of osd-devices by in-kernel users, eg: file systems. In-Kernel users, now, go through the same path user-mode does by opening a file on the osd char-device and though holding a reference to both the device and the Module.
A file pointer was added to the osd_dev structure which is now allocated for each user. The internal osd_dev is no longer exposed outside of the uld. I wanted to do that for a long time so each libosd user can have his own defaults on the device.
The API is left the same, so user code need not change.
It is no longer needed to open/close a file handle on the osd char-device from user-mode, before mounting an exofs on it.
--- drivers/scsi/osd/osd_uld.c | 66 +++++++++++++++++++----------------------- include/scsi/osd_initiator.h | 1 + 2 files changed, 31 insertions(+), 36 deletions(-)
drivers/scsi/osd/osd_uld.c +30 -36
@@ -49,6 +49,7 @@#include <linux/device.h> #include <linux/idr.h> #include <linux/major.h> +#include <linux/file.h> #include <scsi/scsi.h> #include <scsi/scsi_driver.h>
@@ -175,10 +176,9 @@ static const struct file_operations osd_fops = {struct osd_dev *osduld_path_lookup (const char *name) { -struct path path; -struct inode *inode; -struct cdev *cdev; -struct osd_uld_device *uninitialized_var (oud ); +struct osd_uld_device *oud; +struct osd_dev *od; +struct file *file;int error;if (!name || !*name) {
@@ -186,52 +186,46 @@ struct osd_dev *osduld_path_lookup(const char *name)return ERR_PTR (-EINVAL ); } - error =kern_path (name,LOOKUP_FOLLOW , &path); -if (error) { -OSD_ERR ("path_lookup of %s failed=>%d\n" , name, error); -return ERR_PTR (error); - } + od =kzalloc (sizeof (*od),GFP_KERNEL ); +if (!od) +return ERR_PTR (-ENOMEM ); - inode = path.dentry->d_inode; - error = -EINVAL ;/* Not the right device e.g osd_uld_device */ -if (!S_ISCHR (inode->i_mode)) { -OSD_DEBUG ("!S_ISCHR()\n" ); - goto out; + file =filp_open (name,O_RDWR ,0 ); +if (IS_ERR (file)) { + error =PTR_ERR (file); + goto free_od; } - cdev = inode->i_cdev; -if (!cdev) { -OSD_ERR ("Before mounting an OSD Based filesystem\n" ); -OSD_ERR (" user-mode must open+close the %s device\n" , name); -OSD_ERR (" Example: bash: echo < %s\n" , name); - goto out; +if (file->f_op != &osd_fops){ + error = -EINVAL ; + goto close_file; } -/* The Magic wand. Is it our char-dev */ -/* TODO: Support sg devices */ -if (cdev->owner !=THIS_MODULE ) { -OSD_ERR ("Error mounting %s - is not an OSD device\n" , name); - goto out; - } + oud = file->private_data; - oud = container_of(cdev, struct osd_uld_device, cdev); + *od = oud->od; + od->file = file; -__uld_get (oud); - error =0 ; +return od; -out: -path_put (&path); -return error ?ERR_PTR (error) : &oud->od; +close_file: +fput (file); +free_od: +kfree (od); +return ERR_PTR (error); }EXPORT_SYMBOL (osduld_path_lookup);void osduld_put_device (struct osd_dev *od) { -if (od) { -struct osd_uld_device *oud =container_of (od, - struct osd_uld_device, od); -__uld_put (oud); +if (od && !IS_ERR (od)) { +struct osd_uld_device *oud = od->file->private_data; + +BUG_ON (od->scsi_device != oud->od.scsi_device); + +fput (od->file); +kfree (od); } }EXPORT_SYMBOL (osduld_put_device);
include/scsi/osd_initiator.h +1 -0
@@ -48,6 +48,7 @@ enum osd_std_version {*/ struct osd_dev {struct scsi_device *scsi_device; +struct file *file;unsigned def_timeout;#ifdef OSD_VER1_SUPPORT
Signature · 1 line
1.6.2.1
PATCH 9/10 libosd: Use REQ_QUIET requests.
In reply to Boaz Harroshlibosd has it's own sense decoding and printout. Don't let scsi_lib duplicate that printout. (Which is done wrong in regard to osd commands)
--- drivers/scsi/osd/osd_initiator.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/scsi/osd/osd_initiator.c +2 -0
@@ -1340,6 +1340,8 @@ static int _init_blk_request(struct osd_request *or, or->request = req; req->cmd_type =REQ_TYPE_BLOCK_PC ; + req->cmd_flags |=REQ_QUIET ; + req->timeout = or->timeout; req->retries = or->retries; req->sense = or->sense;
Signature · 1 line
1.6.2.1
PATCH 10/10 osd: Remove out-of-tree left overs
In reply to Boaz Harrosh* Delete Makefile. It is only used for out-of-tree compilation and was never needed. It slipped in by mistake.
* Remove from Kbuild all the out of tree stuff as promised.
--- drivers/scsi/osd/Kbuild | 25 ------------------------- drivers/scsi/osd/Makefile | 37 ------------------------------------- 2 files changed, 0 insertions(+), 62 deletions(-) delete mode 100755 drivers/scsi/osd/Makefile
drivers/scsi/osd/Kbuild +0 -25
@@ -11,31 +11,6 @@ # it under the terms of the GNU General Public License version 2 # -ifneq ($(OSD_INC),) -# we are built out-of-tree Kconfigure everything as on - -CONFIG_SCSI_OSD_INITIATOR=m -ccflags-y += -DCONFIG_SCSI_OSD_INITIATOR -DCONFIG_SCSI_OSD_INITIATOR_MODULE - -CONFIG_SCSI_OSD_ULD=m -ccflags-y += -DCONFIG_SCSI_OSD_ULD -DCONFIG_SCSI_OSD_ULD_MODULE - -# CONFIG_SCSI_OSD_DPRINT_SENSE = -# 0 - no print of errors -# 1 - print errors -# 2 - errors + warrnings -ccflags-y += -DCONFIG_SCSI_OSD_DPRINT_SENSE=1 - -# Uncomment to turn debug on -# ccflags-y += -DCONFIG_SCSI_OSD_DEBUG - -# if we are built out-of-tree and the hosting kernel has OSD headers -# then "ccflags-y +=" will not pick the out-off-tree headers. Only by doing -# this it will work. This might break in future kernels -LINUXINCLUDE := -I$(OSD_INC) $(LINUXINCLUDE) - -endif - # libosd.ko - osd-initiator library libosd-y := osd_initiator.o obj-$(CONFIG_SCSI_OSD_INITIATOR) += libosd.o
drivers/scsi/osd/Makefile deleted +0 -37
@@ -1,37 +0,0 @@ -# -# Makefile for the OSD modules (out of tree) -# -# Copyright (C) 2008 Panasas Inc. All rights reserved. -# -# Authors: -# Boaz Harrosh <[email protected]> -# Benny Halevy <[email protected]> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# -# This Makefile is used to call the kernel Makefile in case of an out-of-tree -# build. -# $KSRC should point to a Kernel source tree otherwise host's default is -# used. (eg. /lib/modules/`uname -r`/build) - -# include path for out-of-tree Headers -OSD_INC ?= `pwd`/../../../include - -# allow users to override these -# e.g. to compile for a kernel that you aren't currently running -KSRC ?= /lib/modules/$(shell uname -r)/build -KBUILD_OUTPUT ?= -ARCH ?= -V ?= 0 - -# this is the basic Kbuild out-of-tree invocation, with the M= option -KBUILD_BASE = +$(MAKE) -C $(KSRC) M=`pwd` KBUILD_OUTPUT=$(KBUILD_OUTPUT) ARCH=$(ARCH) V=$(V) - -all: libosd - -libosd: ; - $(KBUILD_BASE) OSD_INC=$(OSD_INC) modules - -clean: - $(KBUILD_BASE) clean
Signature · 1 line
1.6.2.1
Quoted 52 lines · Boaz Harrosh
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums [PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let_osd_req_finalize_data_integrityreceive number ofout_bytes[PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameterThese are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an
osd_devwrapper to retrieve therequest_queue
Simple wrapper[PATCH 08/10] osduld: use
filp_open()when looking up an osd-deviceThis patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review[PATCH 09/10] libosd: Use
REQ_QUIETrequests.
Recentscsi_libchanges, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "==RECOVERED_ERROR")
Use of aREQ_QUIETflag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.[PATCH 10/10] osd: Remove out-of-tree left overs
log stat
drivers/scsi/osd/Kbuild | 25 ----------- drivers/scsi/osd/Makefile | 37 ----------------- drivers/scsi/osd/osd_initiator.c | 83 +++++++++++++++++++++++++++----------- drivers/scsi/osd/osd_uld.c | 66 ++++++++++++++---------------- fs/exofs/common.h | 6 --- fs/exofs/inode.c | 8 ++-- fs/exofs/osd.c | 26 ------------ include/scsi/osd_attributes.h | 74 +++++++++++++++++++++++++++++++++- include/scsi/osd_initiator.h | 14 +++++- include/scsi/osd_protocol.h | 8 ++++ 10 files changed, 185 insertions(+), 162 deletions(-) delete mode 100755 drivers/scsi/osd/Makefile
Quoted 3 lines
These patches are available in the git repository at:
git://git.open-osd.org/linux-open-osd.gitosd-devel
Any chance osdblk could get added to this patchset sometime soon?
Jeff
James Bottomley
maintainerQuoted 54 lines · Jeff Garzik
Quoted 53 lines · Boaz Harrosh
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums
[PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let_osd_req_finalize_data_integrityreceive number ofout_bytes[PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameterThese are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an
osd_devwrapper to retrieve therequest_queue
Simple wrapper[PATCH 08/10] osduld: use
filp_open()when looking up an osd-deviceThis patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review[PATCH 09/10] libosd: Use
REQ_QUIETrequests.
Recentscsi_libchanges, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "==RECOVERED_ERROR")
Use of aREQ_QUIETflag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.[PATCH 10/10] osd: Remove out-of-tree left overs
log stat
drivers/scsi/osd/Kbuild | 25 ----------- drivers/scsi/osd/Makefile | 37 ----------------- drivers/scsi/osd/osd_initiator.c | 83 +++++++++++++++++++++++++++----------- drivers/scsi/osd/osd_uld.c | 66 ++++++++++++++---------------- fs/exofs/common.h | 6 --- fs/exofs/inode.c | 8 ++-- fs/exofs/osd.c | 26 ------------ include/scsi/osd_attributes.h | 74 +++++++++++++++++++++++++++++++++- include/scsi/osd_initiator.h | 14 +++++- include/scsi/osd_protocol.h | 8 ++++ 10 files changed, 185 insertions(+), 162 deletions(-) delete mode 100755 drivers/scsi/osd/Makefile
Quoted 5 lines
Quoted 3 lines
These patches are available in the git repository at:
git://git.open-osd.org/linux-open-osd.gitosd-develAny chance osdblk could get added to this patchset sometime soon?
You mean for upstream submission? You need to publish it in final form and sign off on it first ... Even the modified patch set is still showing:
From: Jeff Garzik <[email protected]>
TODO: Commit log
James
Quoted 64 lines · James Bottomley
Quoted 54 lines · Jeff Garzik
Quoted 53 lines · Boaz Harrosh
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums
[PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let_osd_req_finalize_data_integrityreceive number ofout_bytes[PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameterThese are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an
osd_devwrapper to retrieve therequest_queue
Simple wrapper[PATCH 08/10] osduld: use
filp_open()when looking up an osd-deviceThis patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review[PATCH 09/10] libosd: Use
REQ_QUIETrequests.
Recentscsi_libchanges, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "==RECOVERED_ERROR")
Use of aREQ_QUIETflag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.[PATCH 10/10] osd: Remove out-of-tree left overs
log stat
drivers/scsi/osd/Kbuild | 25 ----------- drivers/scsi/osd/Makefile | 37 ----------------- drivers/scsi/osd/osd_initiator.c | 83 +++++++++++++++++++++++++++----------- drivers/scsi/osd/osd_uld.c | 66 ++++++++++++++---------------- fs/exofs/common.h | 6 --- fs/exofs/inode.c | 8 ++-- fs/exofs/osd.c | 26 ------------ include/scsi/osd_attributes.h | 74 +++++++++++++++++++++++++++++++++- include/scsi/osd_initiator.h | 14 +++++- include/scsi/osd_protocol.h | 8 ++++ 10 files changed, 185 insertions(+), 162 deletions(-) delete mode 100755 drivers/scsi/osd/MakefileQuoted 4 lines
Quoted 3 lines
These patches are available in the git repository at:
git://git.open-osd.org/linux-open-osd.gitosd-develAny chance osdblk could get added to this patchset sometime soon?
You mean for upstream submission? You need to publish it in final form and sign off on it first ... Even the modified patch set is still showing:
Quoted 10 lines
From: Jeff Garzik <[email protected]>
TODO: Commit log
NOT-Signed-off-by Jeff Garzik <[email protected]>WILL-Signed-off-by Boaz Harrosh <[email protected]>James
Right, and also it is for post-merge not scsi-misc, as it is dependent on block/for-2.6.31.
James do you want to push this through your tree? or should I push it through the exofs tree?
Thanks
Boaz
Quoted 63 lines · James Bottomley
Quoted 53 lines · Jeff Garzik
Quoted 52 lines · Boaz Harrosh
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums [PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let_osd_req_finalize_data_integrityreceive number ofout_bytes[PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameterThese are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an
osd_devwrapper to retrieve therequest_queue
Simple wrapper[PATCH 08/10] osduld: use
filp_open()when looking up an osd-deviceThis patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review[PATCH 09/10] libosd: Use
REQ_QUIETrequests.
Recentscsi_libchanges, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "==RECOVERED_ERROR")
Use of aREQ_QUIETflag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.[PATCH 10/10] osd: Remove out-of-tree left overs
log stat
drivers/scsi/osd/Kbuild | 25 ----------- drivers/scsi/osd/Makefile | 37 ----------------- drivers/scsi/osd/osd_initiator.c | 83 +++++++++++++++++++++++++++----------- drivers/scsi/osd/osd_uld.c | 66 ++++++++++++++---------------- fs/exofs/common.h | 6 --- fs/exofs/inode.c | 8 ++-- fs/exofs/osd.c | 26 ------------ include/scsi/osd_attributes.h | 74 +++++++++++++++++++++++++++++++++- include/scsi/osd_initiator.h | 14 +++++- include/scsi/osd_protocol.h | 8 ++++ 10 files changed, 185 insertions(+), 162 deletions(-) delete mode 100755 drivers/scsi/osd/MakefileQuoted 4 lines
Quoted 3 lines
These patches are available in the git repository at:
git://git.open-osd.org/linux-open-osd.gitosd-develAny chance osdblk could get added to this patchset sometime soon?
You mean for upstream submission? You need to publish it in final form and sign off on it first ... Even the modified patch set is still showing:
Quoted 6 lines
From: Jeff Garzik <[email protected]>
TODO: Commit log
NOT-Signed-off-by Jeff Garzik <[email protected]>WILL-Signed-off-by Boaz Harrosh <[email protected]>
Yes, that should be affected, hopefully, by the answer to <[email protected]> from May 21.
The main point is to get it queued somewhere. I'm not particular about which queue or patchset.
Jeff
Quoted 37 lines · Boaz Harrosh
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums
[PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let_osd_req_finalize_data_integrityreceive number ofout_bytes[PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameterThese are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an
osd_devwrapper to retrieve therequest_queue
Simple wrapper[PATCH 08/10] osduld: use
filp_open()when looking up an osd-deviceThis patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review[PATCH 09/10] libosd: Use
REQ_QUIETrequests.
Recentscsi_libchanges, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "==RECOVERED_ERROR")
Use of aREQ_QUIETflag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.
Quoted 2 lines
[PATCH 10/10] osd: Remove out-of-tree left overs
The merge window has risen upon us and these patches are still not in scsi-misc. (Luckily they where in linux-next through the osd tree) If these will not go into 2.6.31 I'm very screwed, with the pNFS stuff, Please reconsider?
Thanks in advance
Boaz
James Bottomley
maintainerQuoted 38 lines · Boaz Harrosh
Quoted 37 lines · Boaz Harrosh
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums
[PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let_osd_req_finalize_data_integrityreceive number ofout_bytes[PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameterThese are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an
osd_devwrapper to retrieve therequest_queue
Simple wrapper[PATCH 08/10] osduld: use
filp_open()when looking up an osd-deviceThis patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review[PATCH 09/10] libosd: Use
REQ_QUIETrequests.
Recentscsi_libchanges, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "==RECOVERED_ERROR")
Use of aREQ_QUIETflag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.
Quoted 7 lines
Quoted 2 lines
[PATCH 10/10] osd: Remove out-of-tree left overs
The merge window has risen upon us and these patches are still not in scsi-misc. (Luckily they where in linux-next through the osd tree) If these will not go into 2.6.31 I'm very screwed, with the pNFS stuff, Please reconsider?
I didn't reject them ... they just contain non scsi bits in fs/exofs. However, since they're tightly entangled, I suppose the scsi-misc tree will do ... just testing them out now.
James
Quoted 41 lines · James Bottomley
Quoted 40 lines · Boaz Harrosh
Quoted 39 lines · Boaz Harrosh
These are the accumulated osd patches for the next merge window, Linux 2.6.31.
Most of these patches are a repost rebased on latest scsi-misc
List of patches:
[PATCH 01/10 resend] libosd: OSD2r05: Additional command enums
[PATCH 02/10 resend] libosd: OSD2r05: Attribute definitions
[PATCH 03/10 resend] libosd: Better printout of OSD target system information [PATCH 04/10 resend] libosd: osd_req_{read,write}_kern new API
[PATCH 05/10 resend] libosd: Let_osd_req_finalize_data_integrityreceive number ofout_bytes[PATCH 06/10 resend] libosd: osd_req_{read,write} takes a length parameterThese are a resend. The last 2 patches are important for supporting Jeff's osdblk driver. (The first 4 are old patches that thier time has come)
[PATCH 07/10] libosd: Define an
osd_devwrapper to retrieve therequest_queue
Simple wrapper[PATCH 08/10] osduld: use
filp_open()when looking up an osd-deviceThis patch was inspired by Al Viro. It uses the in-kernel open-file mechanism to look up the osd char-device for Kernel users like exofs and later pNFS-Objlayout.
It was heavily tested and works well.
It fixes the problem we had before, of need to open+close a file handle on the osd-char-device before mounting an exofs.
Please review[PATCH 09/10] libosd: Use
REQ_QUIETrequests.
Recentscsi_libchanges, caused a dmesg span in exofs+osd regular use, because of the way we routinely receive a recovered scsi sense. Recently, for reason I could not find, this condition started to print messages at:
scsi_io_comlition:778 (look for "==RECOVERED_ERROR")
Use of aREQ_QUIETflag is needed to silence these prints.
OSD has it's own prints for scsi-sense returns, when needed.[PATCH 10/10] osd: Remove out-of-tree left overs
Quoted 9 lines
Quoted 4 lines
The merge window has risen upon us and these patches are still not in scsi-misc. (Luckily they where in linux-next through the osd tree) If these will not go into 2.6.31 I'm very screwed, with the pNFS stuff, Please reconsider?
I didn't reject them ... they just contain non scsi bits in fs/exofs. However, since they're tightly entangled, I suppose the scsi-misc tree will do ... just testing them out now.
Yes there is a comment about that in the patch commit log. The API changed and I changed all in-tree users in one patch. (Since I'm the maintainer of exofs, then naturally the Ack). I made sure it will not conflict.
Some exofs patches are post-merge pending once scsi-misc will get in.
Quoted 3 lines
James
Thanks James
Boaz